So, for a bit, I kept messing up nested list comprehensions when I tried to use them. Since I’m usually writing in Python to Get All The Things Done, my usual response is, “Oh, I should figure out what I’m doing wrong sometime, but I’ll just do a
while loop or use
reduce or whatever for now.”
But the other day, I happened on a nice concrete example that clarified things for me, so I figured, maybe I should link it, and share another such example.