Write a python code to create a dictionary
Answers
Answered by
1
In python, creating a dictionary could be REALLY helpful at many times. In order to create a dictionary, you will need to assign a name to your dictionary first and use the {} brackets to place all your dictionary work inside it.
Let's assign our dictionary name an example_dictionary and you want to have a few meaning of words.
All we have to do is example_dictionary = {}
Then, we place the meanings inside the dictionary.
example_dictionary = { 'hi' : 'hello',
'bye' : 'good bye'}
That's it! you created your own dictionary in python
Similar questions