FAQ

To make an example: imaging Bingo.Shuffle the numbers, each number sorted
should be removed from the container, how would it implemented?
The structure seems a set -> unordered collection of unique elements.

You can select a random element from the set with
random.sample(container, num_of_elems)

And then remove the elem from the set with remove.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 12 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedJun 19, '11 at 2:32p
activeJun 21, '11 at 2:15p
posts12
users8
websitepython.org

People

Translate

site design / logo © 2022 Grokbase