Advertise with us

Python Dictionary

Posted by  Franco Falkov
 504  View(s)
Ratings:
Rate this:

What is dictionary in Python?


  1. Re: Python Dictionary

    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