Created
October 5, 2016 15:58
-
-
Save galarant/528b889977101e62fd4ef519bf08d581 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@coroutine | |
def increment_a_key(my_dict, key): | |
my_dict[key] += 1 | |
def main(): | |
example_dict = {'a': 1, 'b': 2, 'c': 3} | |
yield [increment_a_key(example_dict, k) for (k, v) in example_dict.items()] | |
print example_dict |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment