Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ast
- with open("input/8.txt") as file:
- print sum(len(line.strip()) - len(ast.literal_eval(line)) for line in file)
- with open("input/8.txt") as file:
- print sum(2 + line.count('"') + line.count("\\") for line in file)
Advertisement
Add Comment
Please, Sign In to add comment