Solving things with list comprehensions is very idiomatic python, so the thought process goes "the more of these I can stuff inside each other, the more idiomatic my code is."
Solving things with list comprehensions is very idiomatic python, so the thought process goes "the more of these I can stuff inside each other, the more idiomatic my code is."
Also, not nesting things is very idiomatic Python ("Flat is better than nested" is part of the Zen).
So, people generally don't think of nested list comprehensions as idiomatic.
How many levels of indentation are there on each line?
https://i.imgur.com/s1WBHxU.png
Spoiler: Line 3 has no indentation while Line 6 has one level. Line 4 has a mix of tabs and spaces that would confuse Python.
The fact of the matter is that indentation is white space, and white space is implicit by definition. It only exists as the gap between other things.
You will get a "TabError: inconsistent use of tabs and spaces in indentation" exception if you use Python 3.