In Python, the output of an 'and' statement is true only when
Answers
Answered by
4
Answer:
To check if a variable is equal to True/False (and you don't have to distinguish between True / False and truthy / falsy values), use if variable or if not variable . ...
If we want to check that a variable is explicitly True or False (and is not truthy/falsy), use is ( if variable is True ).
Similar questions