On Fri, 09 Feb 2007 14:15:51 +0000, Steve Holden wrote: > area_name_string = '*% s*' % (Area_name) > > Interesting, I never realised until now that you can have spaces between > the percent sign and th format effector.
Space is one of the flags. From the docs: The conversion flag characters are: Flag Meaning # The value conversion will use the ``alternate form'' (where defined below). 0 The conversion will be zero padded for numeric values. - The converted value is left adjusted (overrides the "0" conversion if both are given). (a space) A blank should be left before a positive number (or empty string) produced by a signed conversion. + A sign character ("+" or "-") will precede the conversion (overrides a "space" flag). http://docs.python.org/lib/typesseq-strings.html -- Steven. -- http://mail.python.org/mailman/listinfo/python-list