Oct. 1, 2023, 12:53 p.m. | Scofield Idehen

DEV Community dev.to

Dictionaries are a core and versatile data structure in Python. Also known as hash tables in other languages, dictionaries allow storing data in key-value pairs that provide lightning-fast lookup times.


What Are Dictionaries?


A Python dictionary consists of keys and values:


students = {"Sarah": 90, "Jerry": 75, "David": 82}


The student names are the keys, while the test scores are the values. You can access the values quickly by referring to the key:


print(students["Sarah"]) # Prints 90


This syntax makes …

beginners core data david dictionary hash jerry languages operations programming python sarah students tables tutorial value values

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne

Senior Machine Learning Engineer (MLOps)

@ Promaton | Remote, Europe

Risk Management - Machine Learning and Model Delivery Services, Product Associate - Senior Associate-

@ JPMorgan Chase & Co. | Wilmington, DE, United States

Senior ML Engineer (Speech/ASR)

@ ObserveAI | Bengaluru