Goeduhub Technologies Free Online Tutorials || COVID-19 Projects(AI-ML) || Go to your University  ||  Placement Preparation  
  Register for Project Based Online Training in Artificial Intelligence(AI) & Machine Learning(ML): From 15-08-2020 || Last Batch Student's Projects

1 Answer

0 like 0 dislike
by Goeduhub's Expert (7.9k points)
 
Best answer

Dictionaries 

# Initializing the dictionary 

details = {'Title':'Dr','Given name':'Ram','Middle name':'Kumar','Surname':'Sharma','Age': 50}

# Printing the content of the dictionary

print (details['Title'])
print (details['Given name'])
print (details['Middle name'])
print (details['Surname'])
print (details['Age'])

# Adding new content to the dictionary 

details['Height'] = 5*10+2
print (details['Height'])

details[1] = 'PhD'
print (details[1])

details[2] = 'Machine Learning'
print (details[2])

# Print all the data in the dictionary 

print (details) 

Related questions

1 like 0 dislike
6 answers 375 views
0 like 0 dislike
1 answer 26 views
1 like 0 dislike
1 answer 14 views
0 like 0 dislike
5 answers 274 views
0 like 0 dislike
1 answer 32 views
  Realize your learning potential with courses starting at ₹ 420
 Placements:   List of companies | Logical Reasoning Questions | Quantitative Aptitude Questions | General English Questions | Technical-MCQ and Interview Questions
 Online Free Training:  MACHINE LEARNINGPython Programming | Database Management System(DBMS) | Object Oriented Programming(OOPs) using C++ | Data Structures and Algorithms(DSA) | Java Programming | Linux/Unix | C Programming
Exams: List of Exams After Graduation | List of Engineering Entrance Examinations (UG/PG) | JEE Main | JEE Advanced | GATE | IES | ISROList of PSUs
 Download Previous Year Papers For:  GATE | IES | RAJASTHAN TECHNICAL UNIVERSITY (RTU-Kota)RPSC Technical Exams | ISRO
 Goeduhub
About Us | Contact Us   Social::   |  | 
...