I have dictionary which has {key : []} format. I need to prepare a list sorted based on the length of the value (length of the list). What’s the best way to accomplish this?
I have dictionary which has {key : []} format. I need to prepare a
Share
If you’re looking for the values sorted by length, and assuming dict
d:Also see Sort a Python dictionary by value