Using if __name__ == '__main__'
Many of us have seen the:
import something
def function():
pass
if __name__ == '__main__':
# function calls here...
pass
in one documentation or the other, but what is it?
__main__
'__name__'
Short Answer
It protects users from accid...
blog.siddhesh.cc2 min read