def shuffle(lol):
'''
shuffle inplace each list in the same order by ensuring that we
use the same state for every run of shuffle.
lol :: list of list as input
'''
state = random.getstate()
for l in lol:
random.setstate(state)
random.shuffle(l)
评论列表
文章目录