python 将一个列表乱序

 

import random  
  
nums = [1, 2, 3, 4, 5, 6, 7]  
random.shuffle(nums)  
print(nums)

 

posted @ 2018-11-15 21:10  anobscureretreat  阅读(7251)  评论(0编辑  收藏  举报