3 ms·
List comprehensions iterate in the same order as the for loops. If it helps, stick a mental newline in there :P [(x, y) for x in range(10) for y in ran
by kbd 15y ago
List comprehensions iterate in the same order as the for loops. If it helps, stick a mental newline in there :P
[(x, y) for x in range(10)
for y in range(5)...]