r/programminghelp • u/thelearningjourney • Aug 18 '21
Python How to organise a complex dictionary
Hello :)
Let's say I have a dictionary such as:
{'women': [['Mary', 28], ['Lucy', 32], ['Alice', 67]],
'men': [['Ste', 32], ['Mike', 19], ['Jack', 24]]}
And I want to print this dictionary as is, but with the people within their categories (women and men) from oldest to youngest. How do I do that, please?
4
Upvotes
2
u/SaylorMan1496 Aug 18 '21
Your only “dictionary” part of this is the women and men those point to a list of tuples does that help point in the right direction?