coding random selection from list
doyen at mediaone.net
doyen at mediaone.net
Tue Feb 29 22:11:21 EST 2000
More information about the Python-list mailing list
Tue Feb 29 22:11:21 EST 2000
- Previous message (by thread): coding random selection from list
- Next message (by thread): any non programmers out there?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
def returnname(list):
return list[random.randint(0,(len(list)-1))] # returns a random
selection from a list
It seems to work, is it correct and efficient?
doyen at mediaone.net
- Previous message (by thread): coding random selection from list
- Next message (by thread): any non programmers out there?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list