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)
EDIT:
I want to make sure that random shuffle does not repeat its shuffling method in a loop. For example,
I want to shuffle [1, 2, 3, 4, 5, 6]
I loop over 10000 times.
It produces results below: [1, 3, 2, 4, 5, 6] [2, 1, 4, 5, 3, 6] ... (large number of different combinations of shuffling) [1, 3, 2, 4, 5, 6] [2, 1, 4, 5, 3, 6] ... (repeats the pattern).
I want to avoid above behaviour because I am looping over a large number. Would above behaviour happen in the first place? If so, do I have to change the seed after certain number of loop?