summaryrefslogtreecommitdiffhomepage
path: root/python.html.markdown
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2014-09-10 16:16:32 -0500
committerLevi Bostian <levi.bostian@gmail.com>2014-09-10 16:16:32 -0500
commit4b63f7bf3897300cbc5075a414cd8acc58f49b49 (patch)
treebc6d957beb8f253d59e4d69f159199abae17a6fc /python.html.markdown
parent1d5533f45b4b123920e633064b23332039335f7e (diff)
parent81b4f49e999a6ec41bd1f79d77208d2db0a29871 (diff)
Merge pull request #750 from xksteven/master
[python3/en] Added Boolean operators + lowered line lengths
Diffstat (limited to 'python.html.markdown')
-rw-r--r--python.html.markdown14
1 files changed, 11 insertions, 3 deletions
diff --git a/python.html.markdown b/python.html.markdown
index 9057dde2..390c7b76 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -57,9 +57,17 @@ to Python 2.x. Look for another tour of Python 3 soon!
# Enforce precedence with parentheses
(1 + 3) * 2 # => 8
-# Boolean values are primitives
-True
-False
+# Boolean Operators
++# Note "and" and "or" are case-sensitive
++True and False #=> False
++False or True #=> True
++
++# Note using Bool operators with ints
++0 and 2 #=> 0
++-5 or 0 #=> -5
++0 == False #=> True
++2 == True #=> False
+1 == True #=> True
# negate with not
not True # => False