A good example is the recent release of Advent of Code, I decided to take up the challenge, I spent way too much time trying to figure out idiomatic / pythonic ways to solve a for loop / opening a file for example, whereas I could of easily spent solving the problem itself.
Most of the time when I don't reach a perfect solution I just leave working on the project altogether.
Am I the only one dealing with this? Do you have any recommendations to overcome such a bad habit?
P.S: I am not medically diagnosed as a person with OCD, IRL I am a simple messy guy, this habit just exists in coding.