Q. What is the purpose of the following code?
Code:
if __name__ == "__main__":
myFunction()
β
Correct Answer: (B)
Run the python module as the main program
Explanation: When Python runs the “source file” as a main program, it sets the special variable (__name__) to ("__main__").