Use a list comprehension instead of a for loop.