Modules: What does if name == main do? - Python

Опубликовано: 21 Июль 2026
на канале: Dcode Tech
51
2

This video explains why if _name_ == '__main__' in python. This feature is to have code only run when the file it is in, is run directly, and have it not run when the file (module) is imported into another file. This video is a continuation of python for beginners series. I use python3.7 in this tutorial series.

Support the Channel:
Patreon:   / dcodetech