Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 1
Why added to python program file ?
If_name_ ==ā_main_ā: main()
2 Respostas
+ 3
See this answer and btw it is double underscore
if __name__ == "__main__" :
https://www.sololearn.com/Discuss/2296422/?ref=app
+ 3
TheĀ __name__Ā variable is a special Python variable.Ā It gets its value depending on how we execute the containing script. If we execute the original script it's value will be main but if we use this script from any other script it's value will be same as your original script's name