lundi 18 janvier 2016

Randomizing a list in Python [duplicate]

This question already has an answer here:

I am wondering if there is a good way to "shake up" a list of items in Python. For example [1,2,3,4,5] might get shaken up / randomized to [3,1,4,2,5] (any ordering equally likely).




Aucun commentaire:

Enregistrer un commentaire