On 4/8/07, linda.s <[EMAIL PROTECTED]> wrote:

> how i can randomly reassign the values to different location in the list?

>>> import random
>>> mylist = [1,2,3,4,5,6,7,8,9]
>>> mylist
[1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> random.shuffle(mylist)
>>> mylist
[3, 6, 9, 4, 7, 1, 2, 8, 5]


-- 
- Rikard - http://bos.hack.org/cv/
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to