python - generating multiple 1-d arrays from randomizing an array -


i have array of values

d = [1,2,3,4,.....100] 

i wondering how create several 1-d arrays (3,20 or 100) using

random.shuffle(d)  

in single loop?

import copy, random  result = [] d = range(1, 101) in xrange(100):     result.append(copy.copy(d))     random.shuffle(result[-1]) 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -