
今天的练习我无法在ipad上测试
它需要shell
from sys import argv
script,first,scond,third = argv
print("The script is called:".format(script))
print("Your first variable is:".format(first))
print("Your scond variable is:".format(scond))
print("Your third variable is:".format(third))
如果是windows系统的话,你单击开始,在运行中输入powershell就会打开powershell。然后进入到你的工作目录。
像dos系统那样的。
输入类似下面的命令才能实现这段代码的功能。也就是说这段代码需要我们在python外调用python 再调用刚写的代码 并且传递更多的参数。
python pythonista20190310.py first 2nd 3rd
网友评论