Here is the simple code
import sys
print (sys.argv[1])
I am working on passing argument to PYTHON from PHP For that first I want to make sure Python taking argument successfully. For that purpose i am running that simple two line code and I am getting Error
C:\wamp3\www\v3.0>argument.py hello
Traceback (most recent call last):
File "C:\wamp3\www\v3.0\argument.py", line 2, in <module>
print (sys.argv[1])
IndexError: list index out of range
Can anyone suggest some solution. I have gone through previous posted questions but nothing seems to work for me.