mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
[python/en] Removed unnecessary plus signs in bool operators section
This commit is contained in:
parent
ce3fb267f7
commit
6629b5cd39
@ -58,15 +58,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
|
||||
|
Loading…
Reference in New Issue
Block a user