You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if __name__ == "__main__": #So while we are importing script1 in script2, the __name__ changed to script1, so the if condition is not true, so it will not exceute the main function. So we will not get the output from the script1.
main()
#So now if we will run script2, we will only get the output of script2, no script1.
#we need to use functions from script1 in another script