Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if main python

# Python program to execute
# main directly
print ("Always executed")
 
if __name__ == "__main__":
    print ("Executed when invoked directly")
else:
    print ("Executed when imported")
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #main #python
ADD COMMENT
Topic
Name
8+5 =