使用时间作为随机种子 import random import time index = [16, 20, 10, 5] random.seed(time.time()) random.shuffle(index)