Q. What is the output of if None: print(‘True’) else: print(‘False’)?

A
True
B
False
C
None
D
Error
Solution:

None is False in a boolean context, so ‘False’ is printed.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!