首页 > 其他 > 详细

Exercise 13: Parameters, Unpacking, Variables

时间:2014-10-23 14:06:21      阅读:238      评论: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 variable is:", third

Result:

$ python ex13.py first 2nd 3rd The script is called: ex13.py
Your first variable is: first
Your second variable is: 2nd
Your third variable is: 3rd

 

Exercise 13: Parameters, Unpacking, Variables

原文:http://www.cnblogs.com/hluo/p/4045416.html

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