What is the output of print(0 or 0) in Python?
print(0 or 0)
Correct answer
B. 0
B. 0
`or` returns the first truthy operand, otherwise the last operand; both are falsy here so the last 0 is returned.
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.