10 Python One-Liners for Dictionaries
Background on Dictionaries
Previously, I wrote an article of ten one-liners for Python lists. Another important built-in data type in Python is dictionaries. Whereas lists are ordered collections of objects, dictionaries are unordered collections. Instead of positional offsets (indices) as in lists, dictionary elements are stored and fetched by keys. Dictionaries are extremely…