jeudi 28 novembre 2019

Python function which provides a random orderings completely different from the previous one

I am looking for a function in Python which provides you different orderings each time without replacement, so for example:

[0, 1, 2, 3, 4, 5]

[1, 2, 3, 4, 5, 0]

[2, 3, 1, 5, 0, 4]

but not

[0, 4, 5, 1, 3, 2]

since number 0 has already been in the first position once.




Aucun commentaire:

Enregistrer un commentaire