Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Doc/tutorial/datastructures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,12 @@ More on Conditions
The conditions used in ``while`` and ``if`` statements can contain any
operators, not just comparisons.

The comparison operators ``in`` and ``not in`` check whether a value occurs
(does not occur) in a sequence. The operators ``is`` and ``is not`` compare
whether two objects are really the same object. All comparison operators have
the same priority, which is lower than that of all numerical operators.

The comparison operators ``in`` and ``not in`` are membership tests that
determine whether a value is in (or not in) a container. The operators ``is``
and ``is not`` compare whether two objects are really the same object. All
comparison operators have the same priority, which is lower than that of all
numerical operators.

Comparisons can be chained. For example, ``a < b == c`` tests whether ``a`` is
less than ``b`` and moreover ``b`` equals ``c``.
Expand Down