1. 程式人生 > >python 將一個列表亂序

python 將一個列表亂序

shuf 亂序 and random color import pre port pri

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

python 將一個列表亂序