SyntaxFix
Write A Post
Hire A Developer
Questions
If you call it like this: $ python myfile.py var1 var2 var3
$ python myfile.py var1 var2 var3
import sys var1 = sys.argv[1] var2 = sys.argv[2] var3 = sys.argv[3]
Similar to arrays you also have sys.argv[0] which is always the current working directory.
sys.argv[0]