Created
October 12, 2015 19:54
-
-
Save smakhtin/0d4c1588405d4d79fdf7 to your computer and use it in GitHub Desktop.
Update multiple dict values in Python
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
my_dict = dict.fromkeys(['a', 'b', 'c'], 10) | |
my_dict.update(dict.fromkeys(['b', 'e'], 20)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment