You are reading a single comment by @atk and its replies.
Click here to read the full conversation.
-
I've seen lots of solutions elsewhere (we have a Slack channel at work for it) that would accept lots of other invalid strings. endswith() or the equivalent was a common culprit, for example many would think the following were not invalid:-
hgt:172bcm
hgt:60zin
But Eric chose not put anything like that in.
More regex! Give me more, I need it.
https://github.com/ips-james/AdventOfCode/blob/main/day4.py