列表综合 参见:http://woodpecker.org.cn/abyteofpython_cn/chinese/ch15s03.html

 

#-*-coding:utf-8
def ttt(value1,*args):
    for i in args:
        value1+=i
    print(value1)

def tt2(**args):
    iSum=args['a']+args['b']
    print iSum

ttt(10,1,2,3,4)
tt2(a=3,b=4)

输出:
20
7