S
stevecanfield
I want to do something like this:
from random import choice
x = set(("jenny", "jacqui", "claire", "chris", "tracy"))
somebody = random.choice(x)
but I bet a "TypeError: unindexable object" error. Any suggestions for
an elegant workaround?
I'm using set because I want to know that I have a collection of unique
objects.
steve
from random import choice
x = set(("jenny", "jacqui", "claire", "chris", "tracy"))
somebody = random.choice(x)
but I bet a "TypeError: unindexable object" error. Any suggestions for
an elegant workaround?
I'm using set because I want to know that I have a collection of unique
objects.
steve