What is the output of print(5 and 0) in Python?
print(5 and 0)
Correct answer
B. 0
7 views
B. 0
7 views
`and` returns the first falsy operand, or the last one if all are truthy.
Asked in: Python Interview Control Flow
https://docs.python.org/3/tutorial/controlflow.htmlNot sure why the answer is B? Ask here and get an explanation.