3 ms·
Tuples and generator comprehensions also don't mix well: >>> (x, x*2 for x in "qwe") File "<stdin>", line 1 (x, x*2 for x in "qwe") ^
by eesmith 7y ago
Tuples and generator comprehensions also don't mix well:
>>> (x, x*2 for x in "qwe")
File "<stdin>", line 1
(x, x*2 for x in "qwe")
^
SyntaxError: invalid syntax
>>> ((x, x*2) for x in "qwe")
<generator object <genexpr> at 0x107821350>