Guest User

Untitled

a guest
Dec 8th, 2015
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. import ast
  2. with open("input/8.txt") as file:
  3. print sum(len(line.strip()) - len(ast.literal_eval(line)) for line in file)
  4. with open("input/8.txt") as file:
  5. print sum(2 + line.count('"') + line.count("\\") for line in file)
Advertisement
Add Comment
Please, Sign In to add comment