I have one array:
one = ['telephone', 'first_name', 'second_name']
another array:
two = ['first_name', 'second_name', 'telephone']
Can I sort two
just like one
? In no particular order that is? I always want it ordered it as one
this function:
def sort_list(list1, list2):
zipped_pairs = zip(list2, list1)
z = [x for _, x in (zipped_pairs)]
return z
three = sort_list(two, one)
THis is sorting the zipped array which I don't want