Right-Justifying Numeric Output
Gabriel Genellina
gagsl-py at yahoo.com.ar
Thu Jan 25 20:21:45 EST 2007
At Thursday 25/1/2007 19:34, Rich Shepard wrote:
> > assuming max size = 10
> >
> > #with spaces
> >>> '% 10d' % 11
> > ' 11'
> > #with zeros
> >>> '%010d' % 11
> > '0000000011'
>
> Thank you very much! I didn't see this in any of my Python books or on the
>Web.
http://docs.python.org/lib/typesseq-strings.html
--
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
More information about the Python-list
mailing list