Skip to content

Instantly share code, notes, and snippets.

@vojd
Last active December 14, 2015 04:29
Show Gist options
  • Save vojd/5028912 to your computer and use it in GitHub Desktop.
Save vojd/5028912 to your computer and use it in GitHub Desktop.
Mundane summing from lists
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