Using generator expressions and comprehensions