$ python Python 3.6.0 (default, Dec 26 2016, 18:23:08) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> data = ( ... (1,2), ... (3,4), ... ) >>> [a for a in data] [(1, 2), (3, 4)]
Now, this puzzles me:
>>> [x,y for a in data]
File "<stdin>", line 1
[x,y for a in data]
^
SyntaxError: invalid syntax
I expected:
[(1, 2), (3, 4)]
--
https://mail.python.org/mailman/listinfo/python-list
