Skip to content

Instantly share code, notes, and snippets.

@vijfhoek
Created November 7, 2021 15:15
Show Gist options
  • Save vijfhoek/d17594677ab4fde14f0831c92410e998 to your computer and use it in GitHub Desktop.
Save vijfhoek/d17594677ab4fde14f0831c92410e998 to your computer and use it in GitHub Desktop.
import fileinput
part1, part2 = 0, 0
for line in fileinput.input():
line = line.strip()
part1 += len(line) - len(eval(line))
part2 += line.count("\\") + line.count('"') + 2
print(part1, part2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment