Skip to content

Instantly share code, notes, and snippets.

@xiaq
Created March 14, 2015 20:10
Show Gist options
  • Save xiaq/ff936606b703d4ac3cb6 to your computer and use it in GitHub Desktop.
Save xiaq/ff936606b703d4ac3cb6 to your computer and use it in GitHub Desktop.
import sys
COL = 2
acc = 0
with open(sys.argv[1]) as f:
for line in f:
acc += int(line.split('\t')[COL])
print acc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment