Skip to content

Instantly share code, notes, and snippets.

salesTotal = 0
oldKey = None
for line in sys.stdin:
data = line.strip().split("\t")
if len(data) != 2:
# Something has gone wrong. Skip this line.
continue
thisKey, thisSale = data