Q. What is the output of print(__name__) in a script?

A
__name__
B
main
C
__main__
D
script
Solution:

print(__name__) outputs ‘__main__’ when the script is run directly.

Entri Contact Image

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