change the for cycle to list comprehensions.