In python, I wrote this function to teach myself how **kwargs works in Python:
def fxn(a1, **kwargs):
print a1
for k in kwargs:
This has finally been introduced in the 3.6 release: dicts are now ordered, therefore the keyword argument order is preserved.
Python 3.6.0 (default, Jan 13 2017, 13:27:48)
>>> def print_args(**kwargs):
... print(kwargs.keys())
...
>>> print_args(first=1, second=2, third=3)
dict_keys(['first', 'second', 'third'])