Created
January 25, 2022 14:20
-
-
Save ephes/5c29f2f8738292f707c8bb407d1ade74 to your computer and use it in GitHub Desktop.
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
spam = {"ham": "eggs"} | |
spam | {"ham": "bacon"} # since 3.9 | |
{**spam, "ham": "bacon"} # since 3.5 | |
dict(spam, ham="bacon") # even on python2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment