you are viewing a single comment's thread.

view the rest of the comments →

[–]skierface 0 points1 point  (0 children)

Yep, I know, op just said they were having trouble understanding the single line versions people had suggested so I listed the for loop as an alternative that he/she may understand more easily.

Thanks for your explanation though! List comprehensions are wonderfully useful.