Last active
April 20, 2022 17:13
-
-
Save FerusAndBeyond/4fa4901151ffb17916af900c4423245d to your computer and use it in GitHub Desktop.
Python dict initialization
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
# the most common way | |
my_object = { | |
"a": 5, | |
"b": 6 | |
} | |
# what I prefer (avoiding { and ") | |
my_object = dict(a=5, b=6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment