Answer the question
In order to leave comments, you need to log in
How to sort dict by list's sizes in their values?
There is the following dict:
dct = {1: [1, 2, 3, 4, 5], 2:[1, 2, 3], 3:[1, 2, 3, 4, 5, 6, 7, 8, 9], 4:[1, 2, 3, 4, 5, 6, 7, 8], 5:[1, 2, 3, 4, 5, 6, 7, 8, 9]}
{2:[1, 2, 3], 1: [1, 2, 3, 4, 5] , 4:[1, 2, 3, 4, 5, 6, 7, 8], 3:[1, 2, 3, 4, 5, 6, 7, 8, 9], 5:[1, 2, 3, 4, 5, 6, 7, 8, 9]}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question