def foo(arg1,arg2="OK",*tupleArg,**dictArg):
print "arg1=",arg1
print "arg2=",arg2
for i,element in enumerate(tupleArg):
print "tupleArg %d-->%s" % (i,str(element))
for key in dictArg:
print "dictArg %s-->%s" %(key,dictArg[key])
myList=["my1","my2"]
myDict={"name":"Tom","age":22}
foo(123,rt=123,*myList,**myDict)
为什么my1 传给了arg2??
rt=123 会当成字典处理的,把rt=123 改成123就行了
那为什么会从mylist里面取第一个值传给arg2呢