Dictionaries
Contents
1.2. Dictionaries#
1.2.1. Dictionary comprehensions#
I think dictionary comprehensions look at list comprehensions in the rear-view mirror. They are way cooler.
1.2.2. 7 Ways to Merge Dicts in Python#
The 7 best ways of merging dictionaries in Python. And yes, there are more.
These seven violate this statement from the Zen of Python in every sense:
“There should be one– and preferably only one –obvious way to do it.”
What is your favorite method?