2 ms·
To make it even more clear, you can store the generator in a variable and pass it around: >>> x = (a*a for a in range(3)) >>> type(x) <type 'genera
by icebraining 11y ago
To make it even more clear, you can store the generator in a variable and pass it around:
>>> x = (a*a for a in range(3))
>>> type(x)
<type 'generator'>