Wednesday, January 17, 2018

Dictionary in Python

  • Created by using bracket
  • Key value pairs
  • 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
  • Do not have any  order
Accessing Values in Dictionary
To access dictionary elements, you can use the familiar square brackets along with the key to obtain its value. 

dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}
print ("dict['Name']: ", dict['Name'])
print ("dict['Age']: ", dict['Age'])

dict['Name']:  Zara
dict['Age']:  7

Snapshot of some examples of Dictionary


  1. Aside from these aptitudes, the information researcher has business sharpness, relational abilities, advancement, and critical thinking science course in pune

  2. Great post i must say and thanks for the information.
    data science course

  3. This may not come as uplifting news. Assessing worker fulfillment and execution through AI calculations? machine learning course

  4. Attend The Machine Learning course in Bangalore From ExcelR. Practical Machine Learning course in Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Machine Learning course in Bangalore.
    Machine Learning course in Bangalore

  5. Thank you so much for helping me out to find the Data analytics course in Mumbai Organisations and introducing reputed stalwarts in the industry dealing with data analyzing & assorting it in a structured and precise manner. Keep up the good work. Looking forward to view more from you.

  6. Such a very useful article. I have learn some new information.thanks for sharing.
    data scientist course in mumbai