Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain the dictionary in Python.



Explain the dictionary in Python...

Answer / chaitanya

Python's built-in data type is dictionary, which defines one-to-one relationships between keys and values.

Dictionaries consist of pairs of keys and their corresponding values.

Dictionaries are indexed by keys.

Dictionary is similar to associative array or hash table of other languages.

As following example explains further- India, Angel & Cartoon are keys & their corresponding values are Bharat, Mother Teresa & Mickey respectively.

>>> dict = {'India': 'Bharat', 'Angel': ‘Mother Teresa’, 'Cartoon': 'Mickey'}

>>>print dict[India]

Bharat

>>>print dict[Angel]

Mother Teresa

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Python Interview Questions

What do you mean by instance?

0 Answers  


How Python performs Compile-time and Run-time code checking?

0 Answers  


What does netflix use python for?

0 Answers  


How long do goats sleep?

0 Answers  


What is dogpile mechanism? Explain.

0 Answers  


What is the shortest method to open a text file and display its content?

0 Answers  


Explain identity operators in python?

0 Answers  


Does python have oops concepts?

0 Answers  


Is python good for oop?

0 Answers  


Is python time time utc?

0 Answers  


How does break, continue and pass work?

0 Answers  


Is there a way to remove the last object from a list?

0 Answers  


Categories