The syntax for generator expression matches with the list comprehension, but the difference is that it uses parenthesis:
( expression(var) for var in iterable )
For example, the below code will create a generator object that generates the values from 10 to 20 upon using it.
>>> (var for var in range(10, 20))
at 0x0000000003668728>
>>> list((var for var in range(10, 20)))