Created
June 12, 2015 16:56
-
-
Save bvanderlugt/1b0bb1e46b22913a993e to your computer and use it in GitHub Desktop.
cool python one-liners...or multi-liners
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
# cool way to increment a value in a dict | |
some_dict[aKey] = some_dict.get(aKey, 0) + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment