码迷,mamicode.com
首页 > 其他好文 > 详细

Exercise 13: Parameters, Unpacking, Variables

时间:2014-10-23 14:07:22      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   ar   sp   div   on   log   bs   

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

标签:style   blog   color   ar   sp   div   on   log   bs   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!