coding random selection from list

doyen at mediaone.net doyen at mediaone.net
Tue Feb 29 22:11:21 EST 2000


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





More information about the Python-list mailing list