
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Print Value for Given Key in Python Dictionary
Python dictionary is collection of key value pairs. Value associated with a certain key is returned by get() method.
>>> D1={'a':11,'b':22,'c':33} >>> D1.get('b') 22
You can also obtain value by using key inside square brackets.
>>> D1['c'] 33
Advertisements