Python: Dictionary

It is a collection which is changeable and does not allow duplicates It is used to store data values like a map, which unlike other Data Types that hold only single value as an element, Dictionary holds key:value pair. 

Each key is separated from its value by a colon (:), the items are separated by commas, and the whole thing is enclosed in curly braces. Keys are unique within a dictionary while values may not be. Keys are case sensitive, same name but different cases of Key will be treated distinctly.

The values of a dictionary can be of any type, but the keys must be of an immutable data type such as strings, numbers, or tuples and also unique.

Example:

dict_1={1:'apple',2:'papaya',3:'pineapple'}
print(dict_1)

Output: {1: 'apple', 2: 'papaya', 3: 'pineapple'}

Tags