标签:spl ISE unp bsp 参数 自动 dem his ack
参考: python--参数列表的分拆
当你要传递的参数已经是一个列表,调用的函数却接受分开一个个的参数,这个时候可以考虑参数列表拆分:
args=[3,6] x=list(range(*args)) print(x) -------------------输出----------------------------- [3, 4, 5]
def parrot(voltage,state=‘a stiff‘,action=‘voom‘): print("-- This parrot wouldn‘t ",action) print("if you put ",voltage,"volts through it.") print("E‘s",state,"!") d={"voltage":"four million", "state":"bleedin demised","action":"voom"} parrot(**d) -------------------输出----------------------------- -- This parrot wouldn‘t voom if you put four million volts through it. E‘s bleedin demised !
标签:spl ISE unp bsp 参数 自动 dem his ack
原文地址:https://www.cnblogs.com/alex-bn-lee/p/10353590.html