我正在练习Python,名为Learn“Python The Hard Way 3rd edition”。我搜索了这本书是开始的好资源。这里有什么问题? Python2 - > Python3
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)
我得到一个错误,说value error: not enough values to unpack (expected 4, got 1)
。
你能举出更多的例子吗? –
@OliverBird肯定:'$ python myscript.py一二三' – Mureinik
谢谢。我得到了我的结果! –