Python Dictionaries

 

Python Dictionaries

Dictionaries are ordered collection of data items. They store multiple items in a single variable. Dictionaries items are key-value pairs that are separated by commas and enclosed within curly brackets {}.

 

Example:

info = {'name':'Maxon', 'age':25, 'eligible':True}
print(info)

Output:

{'name': 'Maxon', 'age': 25, 'eligible': True}