笨办法学python:参数、解包、变量

附加题:

3. 将 raw_input 和 argv 一起使用,让你的脚本从用户手上得到更多的输入

from sys import argv

script,s1,s2=argv

input_1 = raw_input("Your" + s1 +"is:")
input_2 = raw_input("your"+s2+"is:")

print "your input %s is: %s"%(s1,input_1)

print "your input %s is : %s"%(s2,input_2)

 

posted @ 2017-11-11 14:15  raye  阅读(355)  评论(0编辑  收藏  举报