lol :: list of list as input seed :: seed the shuffling shuffle inplace each list in the same order
(lol, seed)
| 30 | |
| 31 | # utils functions |
| 32 | def shuffle(lol, seed): |
| 33 | ''' |
| 34 | lol :: list of list as input |
| 35 | seed :: seed the shuffling |
| 36 | |
| 37 | shuffle inplace each list in the same order |
| 38 | ''' |
| 39 | for l in lol: |
| 40 | random.seed(seed) |
| 41 | random.shuffle(l) |
| 42 | |
| 43 | |
| 44 | # start-snippet-1 |