Remove comma from tuples in python.

Cameron Simpson cs at
Mon Feb 24 02:19:02 CET 2014

On 21Feb2014 09:32, Roy Smith <roy at> wrote:
> In article <mailman.7230.1392992078.18130.python-list at>,
>  Peter Otten <__peter__ at> wrote:
> > [x*x for (x,) in lst]
> >
> > [paraphrasing...] can be better written as:
> >
> > [x*x for [x] in items]
> I'm torn between, "Yes, the second form is distinctly easier to read" 
> and, "If you think the second form is easier to read, you're admitting 
> you're not really fluent in Python".

Cameron Simpson <cs at>

It is a tale told by an idiot, full of sound and fury, signifying nothing.
        - William Shakespeare

More information about the Python-list mailing list