from random import shuffle color = ['1', '2', '3', '4', '5'] shuffle(color) print(color) 转载于:https://www.cnblogs.com/sea-stream/p/9966153.html