3 AnswersNew Answer
If I understand your question correctly, you want to sort the outer list by the first item in the inner list. Is that correct? Try: sorted(yourList, key=lambda x: x) This will return a sorted version of yourList in ordered by the first item in the inner list in ascending order
Could you provide an example of what you're trying to do?
I want the code to sort it in a way that whichever list is smaller, goes in first, so as if, I already have a list in the database [100, "Name", "Gender" , 23] this is one list, I want it to be added to this list [[101, "Name", "Gender" , 27] [146, "Human" , "Male" , 46] [578, "Felicia" , "Female", 25]] I want the code to sort this list in a way that the first number is the indicator, the lower number is the first one, the biggest number is the last in the list