2020-11-29

I was testing argv import in python and there is an error

I was reading "Learn Python 3 the Hard Way" and was testing the 'from sys import argv' there is an error occuring here is the sample code of the book:

from sys import argv
first, second, third = argv

print("The scipt is called:", script)
print("Your first variable is:", first)
print("Your second variable is:,", second)
print("Your third variable is:", third)

An I got this error:

Traceback (most recent call last): File "d:/MyCodes/PythonCodes/jon.py", line 2, in first, second, third = argv ValueError: not enough values to unpack (expected 3, got 1)



from Recent Questions - Stack Overflow https://ift.tt/3lfAaFJ
https://ift.tt/eA8V8J

No comments:

Post a Comment