Q. What does __name__ == ‘__main__’ check?

A
Module name
B
Execution context
C
Function status
D
Class type
Solution:

__name__ == ‘__main__’ checks if the script is run directly, not imported.

Entri Contact Image

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

    [honeypot honeypot-100]