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).
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Use
random.shuffle
:random.shuffle it!