#!/usr/bin/python
#导入sys模块
import sys
print("the first argv:",sys.argv[0],"
")
print("the second argv:",sys.argv[1],"
")
print("the third argv:",sys.argv[2],"
")
sys.argv[0] 表示第一个参数是python脚本本身
sys.argv[1] 表示传入的第1个参数
sys.argv[2] 表示是传入的第二个参数
#!/usr/bin/python
#导入sys模块
import sys
print("the first argv:",sys.argv[0],"
")
print("the second argv:",sys.argv[1],"
")
print("the third argv:",sys.argv[2],"
")
sys.argv[0] 表示第一个参数是python脚本本身
sys.argv[1] 表示传入的第1个参数
sys.argv[2] 表示是传入的第二个参数