If you have multiple values to sort on I suggest using pandas, building a pandas.DataFrame and sort it using the .sort_values() method, which allows you to provide multiple sorting keys. Your data sounds to complex for lists, it is easy to lose the overview. You could work with dictionaries, but then you need to write some ugly loops or comprehension.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments