You see it everywhere. If you have been coding in Python for a while, or just casually browsing Python Github repositories, you probably have come across this snippet of code. if __name__ == '__main__': # do something It is ubiquitous. In fact, this is how many times this above snippet appears in Github! 18 millions+ [...]
The post Python: __name__ == “__main__” Explained appeared first on Afternerd.
from Planet Python
via read more
No comments:
Post a Comment