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
以上是2.x的程式碼。
在3.x的阪本下,我改成如下
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
或
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)
都會發生錯誤。請問要怎麼改才能在3.x的版本下順利執行?

X