List comprehension is used to define and create a list based on an existing list. For example, if we wanted to separate all the letters in the word “retain,” and make each letter a list item, we could use list comprehension:
r_letters = [ letter for letter in 'retain' ]
print( r_letters)
Output:
['r', 'e', 't', 'a', 'i', 'n']