Identify the correct output of the following Python Command : print (10 or 40)
2023
Identify the correct output of the following Python Command : print (10 or 40)
- A.
10
- B.
40
- C.
50
- D.
400
Attempted by 2052 students.
Show answer & explanation
Correct answer: A
In Python, the or operator returns the first truthy value. Since 10 is truthy, Python returns 10 without checking 40.