Skip to content

Instantly share code, notes, and snippets.

@FerusAndBeyond
Last active April 20, 2022 17:13
Show Gist options
  • Save FerusAndBeyond/4fa4901151ffb17916af900c4423245d to your computer and use it in GitHub Desktop.
Save FerusAndBeyond/4fa4901151ffb17916af900c4423245d to your computer and use it in GitHub Desktop.
Python dict initialization
# 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