import random item = [1,2,4,5,8,5,9] random.shuffle(item) print(item) 转载于:https://www.cnblogs.com/huangjinshan/p/6168752.html