Skip to content

Instantly share code, notes, and snippets.

View chenghan's full-sized avatar

Cheng-Han Lee chenghan

View GitHub Profile
@chenghan
chenghan / gist:7456549
Last active February 5, 2022 20:17
Instructor code that was shown on screen
import sys
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