CodeX
Published in

CodeX

10 Python One-Liners for Dictionaries

Photo by Sandy Millar on Unsplash

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…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store