qa

John Machin sjmachin at lexicon.net
Mon Sep 17 18:22:23 EDT 2007


On Sep 18, 7:59 am, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
wrote:
> En Mon, 17 Sep 2007 18:15:29 -0300, Shawn Minisall <trekker... at gmail.com>
> escribi?:
>
> > I'm trying to get a space in between these two strings but it's ignoring
> > the space in between when it prints.
>
> >  >>> string.capwords (string.join([s1 + " " + s2])) * 3
> > 'Spam Ni!Spam Ni!Spam Ni!'
>
> It doesn't matter how many spaces you put in between, capwords will
> collapse all of them into a single space.

This is true. However AFAICT the OP doesn't have multiple spaces --
unless of course his unspecified s1 had trailing space(s) and/or his
unspecified s2 had leading space(s)!!





More information about the Python-list mailing list