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
Post a Comment