-
-
Save anonymous/377123687ae8ca73d9a37bedc0d76ab1 to your computer and use it in GitHub Desktop.
Demonstration of dict expansion in function calls without kwargs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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