📜  python 对列表中的元素进行加扰 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:33.860000             🧑  作者: Mango

代码示例1
>>> import random
>>> thelist = ['a', 'b', 'c', 'd']
>>> random.shuffle(thelist)
>>> thelist
['d', 'a', 'c', 'b']