DEV Community

Konstantin Lübeck
Konstantin Lübeck

Posted on

Why You Should Use Python if __name__ == "__main__"?

Have you ever wondered that Python doesn't have a main function but people are using if __name__ == __main__: in their code?
Checkout my latest Youtube video and this blog article to find it out why:
https://k0nze.dev/posts/python-name-main/

Top comments (0)