What is the output of print('' or 'hello') in Python?
print('' or 'hello')
Correct answer
B. hello
5 views
B. hello
5 views
`or` returns the first truthy operand.
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.