this is my code :
import random
a = [12,2,3,4,5,33,14,124,55,233,565]
b=[]
for i in a:
b.append(random.choice(a))
print a,b
but i think maybe has a method like sort named randomList
has this method in python .
thanks
>>> random.sample(a, len(a))
[14, 124, 565, 233, 55, 12, 5, 33, 4, 3, 2]
this has several advantages over random.shuffle:
All elements of a are part of the returned list. See more here.