Use list comprehension instead of for loop

Surprisingly there is no difference in speed, but list comprehension
makes a lot more sense.