1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-04 13:57:38 +02:00

Merge pull request #795 from marvelousNinja/plus_signs_in_python

[python/en] Removed unnecessary plus signs in bool operators section
This commit is contained in:
Levi Bostian
2014-10-09 20:07:57 -05:00

View File

@@ -62,15 +62,15 @@ to Python 2.x. Look for another tour of Python 3 soon!
(1 + 3) * 2 # => 8
# 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
# 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