Example and (boolean AND) with example.
Question :
Example and (boolean AND) with example.
The and operator evaluates to True, if both the expressions are true; False if either or both operands evaluate to False. For example,
x and y returns False if x is False, else it returns evaluation of y
x= False;
y=True;
x and y returns False since x is False.
in this case, Python will not evaluate y since it knows that the left hand side of the 'and' expression is False which implies that the whole expression will be False irrespective of the other values.