The reason it has 9 numbers is because python treats
[x + y for x in l2 for y in l1 ]
similarly to
for x in l2:
for y in l1:
x + y
ie, it is a nested loop
The reason it has 9 numbers is because python treats
[x + y for x in l2 for y in l1 ]
similarly to
for x in l2:
for y in l1:
x + y
ie, it is a nested loop