mirror of
https://github.com/danbulant/adventOfCode
synced 2026-05-20 04:38:34 +00:00
4 lines
No EOL
199 B
Python
4 lines
No EOL
199 B
Python
import re
|
|
numbers = [(int(re.match(r".*?(\d)", x)[1]) * 10 + int(re.match(r"(?:.*)(\d)", x)[1])) for x in open("input3", "r") if re.match(r".*?\d+", x) is not None]
|
|
print(sum(numbers))
|
|
print(numbers) |