Changed list.append to list comprehension