|
|
|
|
|
by lisper
3743 days ago
|
|
It's a list comprehension with an implicit nested loop: >>> [y for z in [[1,2,3],[4,5,6]] for y in z]
[1, 2, 3, 4, 5, 6]
The error you get is because "planet" is bound by the second FOR clause, so when you leave it out, planet becomes unbound. |
|
Don't know what a better term might be, but it's good to be aware of the distinction.