You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cf5931b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: concepts/comparisons/about.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The table below shows the most common Python comparison operators:
13
13
|`<=`| "less than or equal to" |`a <= b` is `True` if `a < b` or `a == b` in value |
14
14
|`!=`| "not equal to" |`a != b` is `True` if `a == b` is `False`|
15
15
|`is`| "identity" |`a is b` is `True` if **_and only if_**`a` and `b` are the same _object_|
16
-
|`is not`| "negated identity" |`a is not b` is `True` if `a` and `b` are **not** the same _object_|
16
+
|`is not`| "negated identity" |`a is not b` is `True` if **_and only if_**`a` and `b` are **not** the same _object_|
17
17
|`in`| "containment test" |`a in b` is `True` if `a` is member, subset, or element of `b`|
18
18
|`not in`| "negated containment test" |`a not in b` is `True` if `a` is not a member, subset, or element of `b`|
19
19
@@ -146,7 +146,7 @@ True
146
146
147
147
Comparison operators can be chained _arbitrarily_.
148
148
Note that the evaluation of an expression takes place from `left` to `right`.
149
-
For example, `x < y <= z` is equivalent to `x < y``and``y <= z`, except that `y` is evaluated **only once**.
149
+
For example, `x < y <= z` is equivalent to `x < yandy <= z`, except that `y` is evaluated **only once**.
150
150
In both cases, `z` is _not_ evaluated **at all** when `x < y` is found to be `False`.
151
151
This is often called `short-circuit evaluation` - the evaluation stops if the truth value of the expression has already been determined.
152
152
@@ -180,7 +180,7 @@ Due to their singleton status, `None` and `NotImplemented` should always be comp
180
180
See the Python reference docs on [value comparisons][value comparisons none] and [PEP8][PEP8 programming recommendations] for more details on this convention.
181
181
182
182
```python
183
-
>>>
183
+
184
184
# A list of favorite numbers.
185
185
>>> my_fav_numbers = [1, 2, 3]
186
186
@@ -218,7 +218,7 @@ The operators `in` and `not in` test for _membership_.
218
218
For string and bytes types, `<name> in <fullname>` is `True`_**if and only if**_`<name>` is a substring of `<fullname>`.
0 commit comments