
2 Feb
2015
2 Feb
'15
6:44 a.m.
On 02/02/2015 12:48, João Santos wrote:
L = ['foo', 'bar', 'baz'] is syntactic sugar, you can write L = list('foo', 'bar', 'baz')
No you can't (at least not in Python 2.7.3). (A good advertisement for testing your code before publishing it. ) It has to be L = list(('foo', 'bar', 'baz')) which is using a tuple literal.