python loop vs list comprehension code example
Example: python list comprehension vs for loop
values = [expression for value in collection if condition]
values = []
for value in collection:
if condition:
values.append(expression)
values = [expression for value in collection if condition]
values = []
for value in collection:
if condition:
values.append(expression)