Created
April 1, 2018 12:02
-
-
Save shabbirbhimani/34bf0e40f63e0d4ac91d0c0713648bc0 to your computer and use it in GitHub Desktop.
Membership Operators - 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 string1 variable | |
# Find "H1" in string 1 | |
string1 = "Hello World" | |
print("value of string1 is", string1) | |
# output: value of string1 is Hello World | |
inOutput = "H" in string1 | |
print("is 'H' in string1", inOutput) | |
# output: is 'H' in string1 True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment