flamesrock wrote: > whats the best way to pop a random item from a list??
import random def popchoice(seq): # raises IndexError if seq is empty return seq.pop(random.randrange(len(seq))) --Ben -- http://mail.python.org/mailman/listinfo/python-list
flamesrock wrote: > whats the best way to pop a random item from a list??
import random def popchoice(seq): # raises IndexError if seq is empty return seq.pop(random.randrange(len(seq))) --Ben -- http://mail.python.org/mailman/listinfo/python-list