In-depth analysis of Python solutions to Advent of Code day 1
8 comments · 87% upvoted · source · other discussions
8 comments · 87% upvoted · source · other discussions
Great article, but I do wonder. I used a simple for loop with a lastVal-Variable which gets overridden each loop. Would this be considered an anti-pattern? Seemed like the most simple/readable solution and no need to mess with indices.
For the second part I used pandas rolling sum, a somewhat lazy solution.
That's a very in-depth article!
I really should spend some time using the various features of
itertoolsmodule.RojerGS [OP] 3 points · Dec 2021 · Author of “Pydon'ts”
itertoolsis just awesome :)