Inline for loop

What you are using is called a list comprehension in Python, not an inline for-loop (even though it is similar to one). You would write your loop as a list comprehension like so: When using a list comprehension, you do not call list.append because the list is being constructed from the comprehension itself. Each item … Read more