mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +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
|
(1 + 3) * 2 # => 8
|
||||||
|
|
||||||
# Boolean Operators
|
# Boolean Operators
|
||||||
+# Note "and" and "or" are case-sensitive
|
# Note "and" and "or" are case-sensitive
|
||||||
+True and False #=> False
|
True and False #=> False
|
||||||
+False or True #=> True
|
False or True #=> True
|
||||||
+
|
|
||||||
+# Note using Bool operators with ints
|
# Note using Bool operators with ints
|
||||||
+0 and 2 #=> 0
|
0 and 2 #=> 0
|
||||||
+-5 or 0 #=> -5
|
-5 or 0 #=> -5
|
||||||
+0 == False #=> True
|
0 == False #=> True
|
||||||
+2 == True #=> False
|
2 == True #=> False
|
||||||
1 == True #=> True
|
1 == True #=> True
|
||||||
|
|
||||||
# negate with not
|
# negate with not
|
||||||
|
Loading…
Reference in New Issue
Block a user