I am referring to Python random modules' shuffle function.
from random import shuffle
list = [1, 2, 3, 4]
shuffle(list)
I would guess that above function uses random seed. I know that in C, rand function iterates over a few random seed numbers in computer. Therefore, when looping over the function, random function does not become random anymore.
Does shuffle function work similar to rand function in C? If so, how can I add my own seed that is random? (I am thinking of using time in millisecond to come up with unique value).
Previously posted comment on the accepted answer on this question but could not get any response (Shuffling a list of objects in python)
Aucun commentaire:
Enregistrer un commentaire