Following is from python website, about
random.shuffle(x[, random])
Shuffle the sequence
x
in place. The optional argument random is a 0-argument function returning a random float in[0.0, 1.0)
; by default, this is the functionrandom()
.Note that for even rather small
len(x)
, the total number of permutations ofx
is larger than the period of most random number generators; this implies that most permutations of a long sequence can never be generated.
If I want to repeat getting a random permutation of ['a'..'k']
, it seems shuffle will NOT give me the randomness. Is my understanding right?
Thank you!