Skip to content

Instantly share code, notes, and snippets.

@gjcourt
Created January 4, 2012 04:35
Show Gist options
  • Save gjcourt/1558523 to your computer and use it in GitHub Desktop.
Save gjcourt/1558523 to your computer and use it in GitHub Desktop.
for site, sns in _map.iteritems():
counts_total = [0] * 5
for sn in sns:
counts = [[int(c) for c in l.split('\t')[1:]] for l in website_map[sn]]
for count in counts:
counts_total = [sum(c) for c in zip(counts_total, count)]
print '%s\t%s' % (site.strip(), '\t'.join([str(c) for c in counts_total]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment