Is there better ways to randomly shuffle two related lists without breaking their correspondence in the other list? I\'ve found related questions in numpy.array
numpy.array
You can do an unzip at the end to limit the awkwardness a bit?
import numpy as np list1 = [1,2,3] list2 = [4,5,7] list_zipped = list(zip(list1,list2)) np.random.shuffle(list_zipped) list1,list2 = zip(*z) #unzipping