Python で引数変数を使用しようとしましたが、ターミナルでプログラムを実行できません。
プログラム:
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
出力:
>>> execfile("lesson13.py","dog","cat")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be dict, not str
>>>