105
SOLUTION MEGATHREAD-🎄- 2022 Day 2 Solutions -🎄-(self.adventofcode)
submitted 3 years, 1 month ago* (edited 4 days, 4 hours after) by daggerdragon to /r/adventofcode (134.8k)
NEW AND NOTEWORTHY
- All of our rules, FAQs, resources, etc. are in our [community wiki](/r/adve...
since 3 years, 1 month ago
4 of 4
Tip Reveddit Real-Time can notify you when your content is removed.
your account history
Tip Check if your account has any removed comments.
view my removed comments you are viewing a single comment's thread.
view all comments


Because the input data ends in a '\n', so it will split with regards to that one as well.
I cannot see your input.txt, but there is probably a blank line at the end of the text file, it happens when you use ctrl-a + ctrl-c to copy the puzzle input. Just delete the last (empty) line in your input file.
there was an extra \n, I removed it manually