python 将一个列表乱序

import random  
  
nums = [1, 2, 3, 4, 5, 6, 7]  
random.shuffle(nums)  
print(nums)
原文地址:https://www.cnblogs.com/sea-stream/p/9966077.html