今天实际操作练习题12题时
这里写代码片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)
该段代码在pycharm上点击run按钮并不能顺利运行。提示信息是:
ValueError: not enough values to unpack
即参数不够。在此程序中,需要为程序提供三个运行时参数,而我所用的pycharm版本中,并没有找到可以可以输入参数的地方。
解决:
1Alt+shift+F10这里点击Edit configurations即可。随后出现
添加参数即可。