selecting a random item from a set
Martin v. Loewis
martin at v.loewis.de
Tue Dec 30 18:30:43 EST 2003
More information about the Python-list mailing list
Tue Dec 30 18:30:43 EST 2003
- Previous message (by thread): selecting a random item from a set
- Next message (by thread): selecting a random item from a set
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alexander Schmolck wrote: > Is there a better way? If not, how about something like Set.randompop()? In principle, random.choice "ought to" work. It doesn't, as it expects the set to be indexable. I would not like the Set type to grow random methods :-) Regards, Martin
- Previous message (by thread): selecting a random item from a set
- Next message (by thread): selecting a random item from a set
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list