Files
python-aoc-2022/day03/part1.min.py
Sebastian Seedorf 9da1101818 Day 03
2022-12-05 09:30:05 +01:00

5 lines
163 B
Python

#!/usr/bin/env python3
print(sum(map(lambda o:o-96if o>96else o-38,(ord(set(l[:len(l)//2]).intersection(set(l[len(l)//2:])).pop())for l in open("input.txt")))))