首页 > 其他 > 详细

Exercise 13 - parameters, unpacking, variables

时间:2019-09-27 12:59:06      阅读:76      评论:0      收藏:0      [点我收藏+]

 

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 vaiable is:", third)

output

PS: 在终端输入参数

D:\>python ex13.py 1st 2ed 3rd
The script is called: ex13.py
Your first variable is: 1st
Your second variable is: 2ed
Your third vaiable is: 3rd

 

2019-09-27

16:17:09

Exercise 13 - parameters, unpacking, variables

原文:https://www.cnblogs.com/petitherisson/p/11597129.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!