Question using CGI in Python
Markus Schaber
markus at schabi.de
Wed Aug 29 16:58:40 EDT 2001
Hi,
Maan M. Hamze <mmhamze at pleiades.net> schrub:
> Thanks for the tip Markus. I was not aware of this.
Another - even more flexible - way would be to put the string parts
into a list, as in liste=['input type="hidden" name="'VAR1" value="',
VAR1, '">].
This list could be extend()ed in a loop or modified when multiple uses
are needed etc. and then you use string.join(liste, "") to concatenate
it (with recent pythons, one could even "".join(liste) in one run.
markus
--
"The strength of the Constitution lies entirely in the determination of
each citizen to defend it. Only if every single citizen feels duty
bound to do his share in this defense are the constitutional rights
secure." -- Albert Einstein
More information about the Python-list
mailing list