Arbitrary key-value pairs in parameters **
- **kwargs
def f(**kw):
print(kw)
f(a=23, b=12)
f(x=11, y=99, z=1)
Output:
{'a': 23, 'b': 12}
{'x': 11, 'y': 99, 'z': 1}
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
def f(**kw):
print(kw)
f(a=23, b=12)
f(x=11, y=99, z=1)
Output:
{'a': 23, 'b': 12}
{'x': 11, 'y': 99, 'z': 1}