When we finally execute our defined function at the end of the code, why we use the statement:
if __name__ == "__main__":
Even we don't write this if statement and simply call our function by our_function(), it is still executed. Then what is the use of this if statement? Can anyone help me with it
if __name__ == "__main__":
Even we don't write this if statement and simply call our function by our_function(), it is still executed. Then what is the use of this if statement? Can anyone help me with it