dictionary

Tim Chase python.list at tim.thechases.com
Fri Oct 24 12:06:23 CEST 2008


>>>> ["%s="%s" % (k,v) for k,v in d.items()]
>   File "<stdin>", line 1
>     ["%s="%s" % (k,v) for k,v in d.items()]
>                                           ^
> SyntaxError: EOL while scanning single-quoted string

You have three quotation marks...  you want

   "%s=%s"

not

   "%s="%s"

-tkc






More information about the Python-list mailing list