Example 1: python shuffle two lists in the same way
import random
your_list_1 = ['the', 'original', 'order']
your_list_2 = [1, 2, 3]
joined_lists = list(zip(your_list_1, your_list_2))
random.shuffle(joined_lists)
your_list_1, your_list_2 = zip(*joined_lists)
print(your_list_1)
print(your_list_2)
--> ('the', 'order', 'original')
--> (1, 3, 2)
Example 2: shuffle two arrays the same way python
>>> import numpy as np
>>> x = np.arange(10)
>>> y = np.arange(9, -1, -1)
>>> x
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> y
array([9, 8, 7, 6, 5, 4, 3, 2, 1, 0])
>>> s = np.arange(x.shape[0])
>>> np.random.shuffle(s)
>>> s
array([9, 3, 5, 2, 6, 0, 8, 1, 4, 7])
>>> x[s]
array([9, 3, 5, 2, 6, 0, 8, 1, 4, 7])
>>> y[s]
array([0, 6, 4, 7, 3, 9, 1, 8, 5, 2])