How would I go about sorting a list of ints in numerical order and then sorting a bunch of other non-int lists to the same order the list of ints has been sorted to?
I’ve tried all kinds of ideas but nothing has worked out so far. This would be really simple if it was possible to sort a dictionary but from what I’ve read that is impossible, so I’m stuck using a bunch of lists instead but can’t find a way to sort one and have the others follow the sort order of the first one.
Just to clarify what I mean, lets say I have a list of ints that are 4, 7, 3, 9 in indexes 0, 1, 2 and 3. I also have a list of strings, “orange”, “apple”, “banana”, “grape” in indexes 0, 1, 2 and 3. So if the lists were beside each other visually, 4 is orange, 7 is apple, 3 is banana, and 9 is grape. I then sort the int list and get 9, 7, 4, 3. How do I then have the string list rearrange itself in the exact same way to be grape, apple, orange, banana?