import randomdef shuffle_list(some_list): randomized_list = some_list[:] while True: random.shuffle(randomized_list) for a, b in zip(some_list, randomized_list): if a == b: break else: return randomized_list
欢迎分享,转载请注明来源:内存溢出
import randomdef shuffle_list(some_list): randomized_list = some_list[:] while True: random.shuffle(randomized_list) for a, b in zip(some_list, randomized_list): if a == b: break else: return randomized_list
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)