*在python中是什么意思

时间:2019-07-12 14:44:54

标签: python python-3.x

嗨,我想阅读python文档,我看到了很多,我知道*函数参数表示函数获取列表,**表示函数获取字典,但是我无法理解其他函数..
抱歉,我很困惑

x2, y2 = zip(*zip(x, y)) (i cant understand * in this state means what )
def parrot(voltage, state='a stiff', action='voom'):
    print("-- This parrot wouldn't", action, end=' ')
    print("if you put", voltage, "volts through it.", end=' ')
    print("E's", state, "!")
d = {"voltage": "four million", "state": "bleedin' demised", "action": "VOOM"}
parrot(**d) ( and why we use ** before d .. d is dictionary )

0 个答案:

没有答案