Skip to content

Instantly share code, notes, and snippets.

/a.py

Created November 14, 2016 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/377123687ae8ca73d9a37bedc0d76ab1 to your computer and use it in GitHub Desktop.
Save anonymous/377123687ae8ca73d9a37bedc0d76ab1 to your computer and use it in GitHub Desktop.
Demonstration of dict expansion in function calls without kwargs
def f(x,y):
print("x is {}\ny is {}".format(x,y))
# without dict expansion
f(3,4)
# with dict expansion
f(**{'y': 4, 'x': 3})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment