summaryrefslogtreecommitdiffhomepage
path: root/python3.html.markdown
diff options
context:
space:
mode:
authorBenur21 <rubjorper@mail.com>2019-11-21 20:15:38 +0000
committerGitHub <noreply@github.com>2019-11-21 20:15:38 +0000
commit9e8184f455af5dcbbc1966cb50cbd0a007a85d2e (patch)
tree6cd85cdea697622f50db8da0cc28692e23f8bb48 /python3.html.markdown
parentf1d03b0318a43441bb96bfdaabbd914eaa985879 (diff)
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.
Diffstat (limited to 'python3.html.markdown')
-rw-r--r--python3.html.markdown5
1 files changed, 3 insertions, 2 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index d09c2819..154acfe0 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -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