This is the pattern which comes with Python:
bar = 
for item in some_iterable:
It helps in the introduction of list comprehension and also concerts to snippets.
bar = [SOME EXPRESSION for item in some_iterable]
This is shorter and clear.
The code follows the pattern twice
twod_list =  \
for i in range (0, 10): \
new =  \ can be replaced } this too
for j in range (0, 10): } with a list /
new.append(foo) / comprehension /
If you are a beginner and want to know more about Data Science the do check out the Data Science course