Python Dictionary

What is dictionary in Python?


Last updated:6/19/2018 2:02:01 AM

1 Answers

Prakash nidhi Verma
Prakash nidhi Verma

Dictionary in Python :

The built-in datatypes in Python is called dictionary. It defines one-to-one relationship between keys and values. Dictionaries contain pair of keys and their corresponding values. Dictionaries are indexed by keys.A dictionary key have numbers and strings in python like Values. 

Example: 

dict={'Country':'India','Capital':'Delhi','PM':'Modi'} 
print dict[Country]
India
print dict[Capital]
Delhi
print dict[PM]
Modi


Answer