mardi 15 décembre 2015

Shuffling a large List in Python

I would like to shuffle a list which contains about 20000 tuples consisting of three integers. I do not want to change the tuples themselves but only their position in the list.

I tried the random.shuffle method but it didn't commit any changes to my list. I assume that this is due to the length of the list.

Do you know any other methods?




Aucun commentaire:

Enregistrer un commentaire