String concatenation

Leif B. Kristensen junkmail at solumslekt.org
Fri Apr 2 03:36:09 EST 2004


Paul Rubin wrote:

> Not tested:
> 
>   tmp = [x for x in res if x and x[0] != '-']
>   return ', '.join(tmp)

Paul,
that looks a lot more like the examples in "Dive Into Python" which I'm
reading at the moment. But the snake won't swallow:

    tmp = [x for x in res if x and x[0] != '-']
    ^
SyntaxError: invalid syntax

I wonder what it's really trying to tell me?

regards,
-- 
Leif Biberg Kristensen
http://solumslekt.org/
Validare necesse est



More information about the Python-list mailing list