返回列表 發帖

亂數 (三) - shuffle()

  1. import random as r
  2. list=[]
  3. for i in range(10):
  4.     list.append(i)
  5. print(list)
  6. r.shuffle(list)
  7. print(list)
複製代碼

  1. import random as r
  2. list=[]
  3. for i in range(10):
  4.     list.append(i)
  5. print(list)
  6. r.shuffle(list)
  7. print(list)
複製代碼

TOP

返回列表