Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

main arguments python

import sys

#run on cmd - python <file_name.py> argument1 argument2

print(len(sys.argv)) #2
print(sys.argv[1]) #argument1
 
PREVIOUS NEXT
Tagged: #main #arguments #python
ADD COMMENT
Topic
Name
9+1 =