Python strings question (vertical stack)

Diez B. Roggisch deets at nospam.web.de
Tue Nov 20 18:05:27 EST 2007


dmitrey schrieb:
> Thanks all, I have solved the problem:
> 
> a="""
> %s
> %s
> %s
> """ % ('asdf', 'asdf2', 'asdf3')
> 
> print a

This is more expensive and not as flexible as the join method. At least 
for growing string-lengths and number of arguments.

Diez



More information about the Python-list mailing list