Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add membership commands in comands topic #4551

Merged
merged 9 commits into from
May 16, 2024
4 changes: 4 additions & 0 deletions content/python/concepts/operators/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,8 @@ Python evaluates an expression in order of precedence as follows:
- `and`
- `or`

## Membership operators
avdhoottt marked this conversation as resolved.
Show resolved Hide resolved
- The `in` operator returns `True` if the element on the right _contains_ the element in the left. Here, the element on the right side of the `in` operator must be an iterable object like a list, string, dictionary, etc.
avdhoottt marked this conversation as resolved.
Show resolved Hide resolved
- The `not in` operator returns `False` if the element on the right _does not contain_ the element on the left. Again, the element on the right side of the ` not in` operator must be an iterable object.
avdhoottt marked this conversation as resolved.
Show resolved Hide resolved

**Note:** Items at the same precedence are evaluated left to right. The exception to this is exponentiation, which evaluates right to left.