Python Logical Operators
Python Logical Operators:
There are following logical operators supported by Python language
Assume variable a = 10 and b = 20 then:
and Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
or Called Logical OR Operator. If any of the two operands are non zero then then condition becomes true. (a or b) is true.
not Called Logical NOT Operator. Use to reverses the logical state of its operand. If a condition is true then Logical NOT operator will make false.
Comments
Post a Comment