Answers for "how to make python input with arguments ex --"

9

python arguments

import sys

print ("the script has the name %s" % (sys.argv[0])
Posted by: Guest on November-18-2019
3

how to get command line arguments in python

#!/usr/bin/python

import sys

print 'Number of arguments:', len(sys.argv), 'arguments.'
print 'Argument List:', str(sys.argv)
Posted by: Guest on July-06-2020

Code answers related to "how to make python input with arguments ex --"

Python Answers by Framework

Browse Popular Code Answers by Language