Sort Nested List

Hello Koders,

I’m trying to find a way to sort a nested list based on numbers while keeping the pairs of (name number).

The list name contains a pair of (position name : difficulty of the position). Position name is the key.

Thank you for your time!

It may be easier to have the list of lists in json format. Try to use dictionaries. You can have key and value pairs at every level of list. So you don’t need to operate on indexes in a list instead you can use strings to call your objects. It’s easier for our brains.

@voltrage1230 gave that solution that worked well

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.