Created
April 1, 2018 12:02
-
-
Save shabbirbhimani/8f491c410197f30a64ff13a804aa76fd to your computer and use it in GitHub Desktop.
Membership Operators - not in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Declare a list list1 with value [12,23,34] | |
list1 = [12,23,34] | |
print("value os list1 is", list1) | |
# output: value os list1 is [12, 23, 34] | |
# using not in operator for 25 | |
notInOperator = 25 not in list1 | |
print("is 25 not in list1", notInOperator) | |
# output: is 25 not in list1 True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment