Correct option is A
In Python, the
and operator is a
logical operator used to combine two or more conditions. It returns
True if both conditions are true, and
False if any one condition is false.
Important Key Points:
1.
Logical Operators: Logical operators in Python include:
·
and: Returns True if both operands are true.
·
or: Returns True if at least one operand is true.
·
not: Reverses the boolean value (returns True if the operand is False, and vice versa).
2.
Usage: Logical operators are typically used in conditional statements to combine multiple conditions.
Knowledge Booster:
·
Option (b): in: The
in operator is used to check if a value exists in an iterable (like a list, tuple, or string). It is not a logical operator.
·
Option (c): <= : The
<= operator is a
comparison operator, used to check if the left operand is less than or equal to the right operand.
·
Option (d): += : The
+= operator is an
assignment operator, used to add a value to a variable and assign the result back to the variable. It is not a logical operator.