Dictionary is a data structure as well as a data type in python.It is enclosed in curly brackets{}.
Dictionary contains 2 elements – key and value
key is a string for us to grab a value.
Exampledictionary = {‘a’: 1,‘b’: 2}print(dictionary[‘b’])
Example
dictionary = {
‘a’: 1,
‘b’: 2
}
print(dictionary[‘b’])