技术笔记---记载学到技术的点点滴滴
import random
mylist = [1, 2, 3]
random.shuffle(mylist) # randomly change the order of the list
print(mylist)
print(random.choice(mylist)) # randomly choose one element from the list
发表评论
没有评论:
发表评论