I'm a beginner : sorry the answer is found nowhere on the web.
Why people in python typically write :
if __name__ == "__main__":
main()
instead of (without space) :
if __name__=="__main__":
main()
Is there a better convention to use ?
I'm a beginner : sorry the answer is found nowhere on the web.
Why people in python typically write :
if __name__ == "__main__":
main()
instead of (without space) :
if __name__=="__main__":
main()
Is there a better convention to use ?
This is a convention is part of the Python Enhancement Proposals, namely, PEP8.
You can check for mor information in: