2023adventofcode/pythonsrc/day1/part1.py

5 lines
277 B
Python
Raw Normal View History

2023-12-02 01:18:20 -06:00
print(
sum([a[0]*10 + a[-1] for a in [[int(b) for b in c if b.isnumeric()] for c in open('resources/day1.txt').read().split("\n")[:-1]]])
)
# sum([a[0]*10 + a[-1] for a in [[int(b) for b in c if b.isnumeric()] for c in open('resources/day1.txt').read().split("\n")[:-1]]])