Concept Flow - __name__ and __main__ behavior
Python file starts
Set __name__ variable
Check if __name__ == "__main__"
Yes No
Run main code
Program ends
When a Python file runs, it sets __name__. If __name__ is "__main__", it runs the main code block; otherwise, it skips it.