Latest Posts

Display nested dictionary content sorted by key in Python

Given a nested dictionary like this:

dog_breeds = {
    'Labrador Retriever': {'life_span': 14, 'male_weight': '36 Kg', 'female_weight': '32 Kg'},
    'Beagle': {'life_span': 15, 'male_weight': '11 Kg', 'female_weight': '10 Kg'},
    'German Shepherd': {'life_span': 13, 'male_weight': '40 Kg', 'female_weight': '32 Kg'},
    'Jack Russell Terrier': {'life_span': 16, 'male_weight': '8 Kg', 'female_weight': '8 Kg'},
    'Rottweiler': {'life_span': 10, 'male_weight': '60 Kg', 'female_weight': '48 Kg'}
}

here’s a way to display its content sorted by key:

Networking for Developers – part 1: overview

For some reason grasping the concepts around computer networks has always been hard for me. Not surprisingly, I find that I’m not the only one: many software developers don’t really understand how computers networks… work. All I know is that I send stuff via the internet and my stuff gets where I wanted it to go. But how does that happen? Magic?

Newer Posts