CodeX
Published in

CodeX

Dictionaries in Python: Everything You Need to Know

Learn the basics of using dictionaries with beginner-friendly examples.

A placeholder image of a computer
Photo by Blake Connally on Unsplash

Dictionaries in Python are a common data type. A dictionary is a collection of key-value pairs. For example:

example_dictionary = {"Ronaldo": 7, "Messi": 10, "Bale": 9}

How to Create a Dictionary

--

--

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
Artturi Jalli

Artturi Jalli

I built a blog from 0 to 350k+ monthly visits in 16 months without SEO.