Answer:
The program to this can be given as:
Program:
d = {} #defining a dictionary.
d[ "Monty" ] = "Python" # assigning a value
#d={' Monty ': ' Python '}
print (d) #print value.
Output:
{'Monty': 'Python'}
Step-by-step explanation:
Dictionary is an unordered data collection that is as opposed to other data types. In dictionary is a collection key and values. The key is a value that is pair as an element and value are stored in a map. The explanation of the above python program can be described as follows:
- In the above python program, a dictionary d is defined that contains a value that is Monty which is also known as dictionary key value.
- In the key-value we assign a value that is "Python". and print the value of the dictionary.
- To print dictionary value the print function is used.