jeudi 10 novembre 2022

I want oposite seed in my list how can I solve it

for example I have this list:

lst = [[0, 1], [0, 1], [0, 1], [1, 0], [1, 0], [1, 0]]

and I shuffle it for example with seed = 42:

random.seed(42)
random.shuffle(lst)

I took this list after shuffle:

[[1, 0], [0, 1], [0, 1], [1, 0], [0, 1], [1, 0]]

I want to take oposite of this shuffle too How can I take this list:

[[0, 1], [1, 0], [1, 0], [0, 1], [1, 0], [0, 1]]

I want oposite seed




Aucun commentaire:

Enregistrer un commentaire