I have a list containing numbers and one containing users. The first element of the first list belongs to the first element of the second list and so on. I then want to sort the number list using sort()
and want the usernames to still match with the numbers they had before.
from:
users = ["max", "david", "freddy"]
numbers = [9, 3, 10]
to:
users = ["david", "max", "freddy"]
numbers = [3, 9, 10]