eLearning
Tutorials
Programs
Interview Questions
Technical Questions
C Language
C++
JAVA
HTML & CSS
PHP
AJAX
J2EE
SQL
jQuery
Go back to Home
Our Placements
Tutorials
Programs
Interview Questions
Technical Questions
Live Training
Our Placements
Associated Colleges
Our Recruiters
Back
C Language
C++
JAVA
HTML & CSS
PHP
AJAX
J2EE
SQL
jQuery
Programs
Home
Programs
Python
Dictionary
Programs - Python -
Dictionary
Program:
# Membership Test for Dictionary Keys
squares = {
1
:
1
,
3
:
9
,
5
:
25
,
7
:
49
,
9
:
81
}
print(
1
in
squares)
print(
2
not
in
squares)
# membership tests for key only not value
print(
49
in
squares)
Output:
True
True
False