That's actually a list comprehension. A generator wouldn't use square brackets.