我正在编写一个来自 Zed A. Shaw 的“Learn Python the Hard Way - 第三版”的程序。我是编程新手,完全卡在练习 12 上。请查看我的代码并帮助我解决我做错的地方,因为我所知道的正是它应该在书中看到的
from sys import argv
script, first, second, third = argv
print "The script is called:", script
print "Your first variable is called:", first
print "Your second variable is:", second
print "Your third variable is:", third
完整的错误信息如下(由于经验不足,我很难理解)
Traceback (most recent call last):
File "ex13.py", line 3, in <module>
script, first, second, third = argv
ValueError: need more than 1 value to unpack