《笨办法学python》源码 Ex13.py



# _*_encoding:utf-8_*_
#-------------------------------------------------------------------------------
# Name:        ex_13.py
# Purpose:     参数,解包,变量
#
# Author:      huanghuan
#
# Created:     14-08-2013
# Copyright:   (c) huanghuan 2013
# Licence:     <your licence>
#-------------------------------------------------------------------------------

# import导入包
# argv标准参数变量
from sys import argv

# 对argv解包的理解,参数批量赋值
script,first,second,third = argv

print "the script is called: ", script
print "the first variable is: ", first
print "the second variable is: ", second
print "the third variable is: ",third

你可能感兴趣的:(《笨办法学python》源码 Ex13.py)