In python, I wrote this function to teach myself how **kwargs works in Python:
def fxn(a1, **kwargs):
print a1
for k in kwargs:
Since kwargs is a Python dictionary, which is implemented as a hash table, its ordering is not preserved and is effectively random.
Actually, as a fix to a recent security issue in many programming languages, in the future the order may even change between invocations of your program (invocations of the Python interpreter).