Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

program arguments python

#!/usr/bin/python

import sys

for args in sys.argv:
  print(args)

"""
If you were to call the program with subsequent arguments, the output 
will be of the following
Call:
python3 sys.py homie no

Output:
sys.py
homie
no
"""
 
PREVIOUS NEXT
Tagged: #program #arguments #python
ADD COMMENT
Topic
Name
2+6 =