Last active
December 14, 2015 04:29
-
-
Save vojd/5028912 to your computer and use it in GitHub Desktop.
Mundane summing from lists
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
objects = [ | |
[{'price' : 100}], | |
[{'price' : 200}], | |
[{'price' : 300}] | |
] | |
the_sum = 0 | |
for o in objects: | |
for i in o: | |
the_sum += i['price'] | |
print 'final sum', the_sum | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment