Triple quoted string in exec function ?
stef.mientki at gmail.com
Fri Jan 2 14:39:25 CET 2009
Stef Mientki wrote:
> I'm running scripts, with the execute function (Python 2.5),
> and it seems that triple quoted strings are not allowed.
> Is there a workaround,
> or is this a fundamental problem of the exec-function ?
> Stef Mientki
thanks for all the answers,
but I still don't understand it yet :-(
So maybe someone could explain why the next few lines of code don't work:
Code = ''
Code += """multiline comment
and more lines"""
exec ( Code )
More information about the Python-list