PHP » PYTHON |
login |
register |
about
|
PYTHON Logical Operators
is this article helpful?
|
Python replacement for PHP's Logical Operators
[
edit
| history
]
a and b #And a or b #Or not a #Not Logical Operators
The reason for the two different variations of "and" and "or" operators is that they operate at different precedences. (See Operator Precedence.) Example #1 Logical operators illustrated
<?php The above example will output something similar to: bool(true) bool(false) bool(false) bool(true) |
more
Recently updated
more
Most requested
more
Last requests
|