New to Python, why is it not quoted?

时间:2018-03-06 11:44:46

标签: python function

def print_dict(**person):
        print(person)

print_dict( a ='jack', b ='rose')
# {'a': 'jack', 'b': 'rose'}

With two asterisks, Python will create a dictionary to hold the keywords arguments. What I do not understand is why the arguments are: a = "Jack" instead of "a" = "Jack", cause a is a key, why is it not quoted?

0 个答案:

没有答案