python函数中,双星号**的作用

https://www.geeksforgeeks.org/packing-and-unpacking-arguments-in-python/ 

https://blog.csdn.net/xiaoqu001/article/details/78823498

** is used for dictionaries

# A sample program to demonstrate unpacking of

# dictionary items using **

def fun(a, b, c):

    print(a, b, c)

# A call with unpacking of dictionary

d = {'a':2, 'b':4, 'c':10}

fun(**d)

猜你喜欢

转载自blog.csdn.net/aaa_aaa1sdf/article/details/82381815