Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

if main

# Python program to execute
# main directly
print ("Always executed")
 
if __name__ == "__main__":
    print ("Executed when invoked directly")
else:
    print ("Executed when imported")
Comment

PREVIOUS NEXT
Code Example
Python :: python 3d array 
Python :: how to add textbox in pygame window 
Python :: python3 shebang 
Python :: python read scv 
Python :: join dataframe pandas by column 
Python :: bot ping command 
Python :: list sort by key and value 
Python :: correlation with specific columns 
Python :: random int python 
Python :: blender scripting set active ojbect 
Python :: python working directory 
Python :: scipy.cluster.hierarchy 
Python :: start project django 
Python :: create a timestamp python 
Python :: how to write pretty xml to a file python 
Python :: xlabel and ylabel in python 
Python :: pandas legend placement 
Python :: check if file is txt python 
Python :: print first word of a string python and return it 
Python :: python get zip file size 
Python :: how to check substring in python 
Python :: join() python 
Python :: plt text matplotlib white background 
Python :: group by pandas count 
Python :: notna pandas 
Python :: get turtle pos 
Python :: python detect warning 
Python :: jupyter dark theme vampire 
Python :: python get desktop environment 
Python :: pd.merge remove duplicate columns 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =