I am a newbie Python. When i am trying execute the below code watching this Video, i got an error. What to understand what is the error, why it is coming and how to over come it?
import sys
x = int(sys.argv[1])
Error:
x = int(sys.argv[1])
IndexError: list index out of range
Than i started my Index value from '0'. Code:
import sys
x = int(sys.argv[0])
Error:
x = int(sys.argv[0])
ValueError: invalid literal for int() with base 10: