beginner Python, for advice:
def print_dict(**person):
print(person)
print_dict( a ="jack", b ="rose")
-sharp {"a": "jack", "b": "rose"}
The parameter is preceded by two asterisks so that Python creates a dictionary to hold the argument. What I don"t understand is why when calling a function, the argument is a = "Jack"
instead of "a" = "Jack"
. Since an is the key to be placed in the dictionary, why not put it in quotation marks?
solution, thank you very much!