That's how groupby works in python and it would be...
# advent-of-code
n
That's how groupby works in python and it would be ideal for processing the file, but can't seem to think of how to do it super elegantly