Bummer! You have been redirected as the page you requested could not be found.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Python Sequences!
You have completed Python Sequences!
Preview
Learn how to determine whether your Python sequence contains a particular value or other sequence.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Membership testing uses
the operators in and not in.
0:00
Take a look at my workspace here,
you can see I have a really long string,
0:01
really an entire paragraph
from the Python documentation.
0:04
I want to know whether this documentation
excerpt contains the string tuple.
0:06
To find that out,
I can use the operator in.
0:11
The expression, 'tuple' in docs,
will evaluate to true or
0:13
false, true if tuple appears in docs,
and false if it does not.
0:19
You'll see this expression most often
used in conjunction with an if statement.
0:24
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up