Explaining better and improving consistence

Added a version without parentheses to make it clear what they are doing;
Added return values for True and False because 3 also has it.
This commit is contained in:
Benur21 2019-11-21 20:15:38 +00:00 committed by GitHub
parent f1d03b0318
commit 9e8184f455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,11 +58,12 @@ Note: This article applies to Python 3 specifically. Check out [here](http://lea
2**3 # => 8
# Enforce precedence with parentheses
1 + 3 * 2 # => 7
(1 + 3) * 2 # => 8
# Boolean values are primitives (Note: the capitalization)
True
False
True # => True
False # => False
# negate with not
not True # => False