list comprenhension to create a new list where each element is the result of some operations applied to each element of another list code example
Example 1: list comprehension
# List comprehension
list_comp = [i+3 for i in range(20)]
# above code is similar to
for i in range(20):
print(i + 3)
Example 2: list comprehension
[expression for item in list]