Skip to content

Commit

Permalink
Add membership commands in comands topic (#4551)
Browse files Browse the repository at this point in the history
* ✨ feat: membership operators

Add membership operators at operators topic

* Update content/python/concepts/operators/operators.md

* Update content/python/concepts/operators/operators.md

* Update content/python/concepts/operators/operators.md

* Update content/python/concepts/operators/operators.md

* Update content/python/concepts/operators/operators.md

* Update content/python/concepts/operators/operators.md

---------
  • Loading branch information
fariamg committed May 16, 2024
1 parent a9e964b commit 01f5557
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions content/python/concepts/operators/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,9 @@ Python evaluates an expression in order of precedence as follows:
- `and`
- `or`

## Membership operators

- The `in` operator returns `True` if the element on the left is found within the iterable object on the right. Here, the element on the right side of the `in` operator must be an iterable object like a list, string, dictionary, etc.
- The `not in` operator returns `False` if the element on the left is not found within the iterable object on the right. Again, the element on the right side of the `not in` operator must be an iterable object.

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

0 comments on commit 01f5557

Please sign in to comment.