我正在練習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
謝謝。我得到了我的結果! –