Command line shortcuts
I normally don’t use many shortcuts because it’s easier to just use my arrows and mouse to navigate than to memorize shortcuts but I am slowly realizing that the time spent on learning a new shortcut pays off.
I normally don’t use many shortcuts because it’s easier to just use my arrows and mouse to navigate than to memorize shortcuts but I am slowly realizing that the time spent on learning a new shortcut pays off.
You can add arguments to the command line when running python scripts by importing the sys module from Python’s standard library and using its argv function.
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:
NOTE: Catch up with the previous posts in this post series:
NOTE: Catch up with the previous posts in this post series: Part 1: Overview
The Network Stack has four layers: Application, Transport, Network (or Internet) and Physical. This post will cover the top two layers: Application and Transport and together they help the destination computer identify what type of data it’s receiving through the network.