Hacker News new | ask | show | jobs
by bpicolo 3743 days ago
That's admittedly a pretty confusing example. I don't recommend ever iterating over multiple lists in a single comprehension. A mental breakdown is:

For episodes in episodes

for planet in episode planets

give me planet

the binding of `planet` isn't evaluated until the end (left to right evaluation for the looping bits)