Sep-12-2022, 05:08 PM
(This post was last modified: Sep-13-2022, 05:29 AM by Yoriz.
Edit Reason: Added code tags
)
I have a dictionary like:
This is not working:
dic = {0: [('key1', 0.061), ('key2', 0.034), ('key3', 0.046), ('key4', 0.0593), ('key5', 0.091)], 1: [('key1', 0.025), ('key2', 0.046), ('key3', 0.014), ('key4', 0.054), ('key5', 0.058)] }How can I sort this based on the float values of each keys.
This is not working:
for i in sorted(dic.values()): print(i)