On Wed, 2009-03-04 at 18:02 +0000, mattia wrote:
> ri = randint(0, len(rw) - 1)
> print("Random index:", rw[ri], ", value:", pop[rw[ri]])

you probably want random.choice(rw)

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to