Every time I run this program I get "ValueError: need more than 1 variable." But I'm doing what Zed says to do by running ex13.py first 2nd 3rd
. I don't need to type python
in the terminal before a filename because my computer recognizes python files. I'm on Windows 7 and using python 2.7. Any help would be appreciated. I've tried the most popular answer in this thread: ValueError: need more than 1 value to unpack , but I'm still getting the same error. Any help would be much appreciated
from sys import argv
script, first, second, third = argv
print "The script is called:", script
print "Your first variable is:", first
print "Your second variable is:", second
print "Your third variable is:", third
Edit: Here's the error I'm getting: Traceback (most recent call last): File "C:\Users\Ian\lpthw\ex13.py", line 3, in script, first, second, third = argv ValueError: need more than 1 value to unpack