标签:练习 end stp dex [] random imp range wpa
import random
newTRanstPai=[]
def pai(num):
newPai = [x for x in range(1,num)]
for i in range(newPai):
newTRanstPai.append(newPai.pop(random.randint(0,num-i))) #用到 列表的 append 和pop(index)
print(newTRanstPai)
标签:练习 end stp dex [] random imp range wpa
原文地址:https://www.cnblogs.com/caozijian-zm/p/10299946.html