1. Home
  2. Data Science
  3. Python
  4. What is the output of print('' or 'hello') in Python?

Added 25 Nov 2026

What is the output of print('' or 'hello') in Python?

print('' or 'hello')
  1. ''
  2. hello Correct answer
  3. None
  4. False

Correct answer

B. hello

10 views

MCQSEXAM

Explanation

`or` returns the first truthy operand.

Reference

Asked in: Python Interview Control Flow

https://docs.python.org/3/tutorial/controlflow.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs