Skip to content

Instantly share code, notes, and snippets.

@shabbirbhimani
Created April 1, 2018 12:02
Show Gist options
  • Save shabbirbhimani/34bf0e40f63e0d4ac91d0c0713648bc0 to your computer and use it in GitHub Desktop.
Save shabbirbhimani/34bf0e40f63e0d4ac91d0c0713648bc0 to your computer and use it in GitHub Desktop.
Membership Operators - in
# 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