Now you know how to perform membership tests using Python’s in and not in operators. This type of test allows you to check if a given value is present in a collection of values, which is a pretty common operation in programming.
In this video course, you’ve learned how to:
- Run membership tests using Python’s
inandnot inoperators - Use the
inandnot inoperators with different data types - Work with
operator.contains(), the equivalent function to theinoperator - Support
inandnot inin your own classes
