from sys import argv
# read the WYSS section for how to run this
script, first, second, third = argv
"""
1、import是将Python的特性引入脚本的方法
2、argv为参数变量,这个变量保存着你运行Python脚本时传递给Python脚本的参数
3、第三行 将argv解包,与其将所有参数放倒同一个变量下面,不如将其赋值给4个变量:script, first, second, third
4、解包的含义很简单:“把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)
"""
input():脚本运行过程中输入
argv:执行命令的时候就要输入
"""
from sys import argv
# read the WYSS section for how to run this
script, first, second, third = argv
"""
1、import是将Python的特性引入脚本的方法
2、argv为参数变量,这个变量保存着你运行Python脚本时传递给Python脚本的参数
3、第三行 将argv解包,与其将所有参数放倒同一个变量下面,不如将其赋值给4个变量:script, first, second, third
4、解包的含义很简单:“把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)
"""
input():脚本运行过程中输入
argv:执行命令的时候就要输入
"""