Created
February 14, 2020 04:13
-
-
Save NegatioN/d576c95345f0cb21437eed8527ab79f7 to your computer and use it in GitHub Desktop.
Dicts passed do not mutate.
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, z): | |
x = "hello" | |
y, z = "swag", "master" | |
d = {'x': "bleh", 'y': "bleh", 'z': "bleh"} | |
f(**d) | |
print(d) | |
# {'x': 'bleh', 'y': 'bleh', 'z': 'bleh'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment