Using a comprehension for more pythonic code.