Skip to content

Instantly share code, notes, and snippets.

@zachwill
Created October 10, 2011 21:40
Show Gist options
  • Select an option

  • Save zachwill/1276634 to your computer and use it in GitHub Desktop.

Select an option

Save zachwill/1276634 to your computer and use it in GitHub Desktop.
my_list = [{'a': 1}, {'a': 2}, {'a': 3}]
print sum(d['a'] for d in my_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment