Dictionary is an ordered, changeable and indexed collection of items. Dictionaries have key and value.
With dictionary, you can do many task that require a lot of code with a single line of code.
Let’s give an example of using dictionary in real life.
You don’t know the phone number of everyone in your phone book. You save the number with the name of the person so that you can access and call the person number with the name at any time.
This is also the same for the python dictionary. Python also consists of dictionary key and value items. We use curly brackets to create a dictionary in Python.
The Python dictionary syntax structure is as follows: