print format

Erik Max Francis max at alcyone.com
Tue Jul 25 20:56:40 EDT 2000


Curtis Jensen wrote:

> I don't know if this is possible in python but, Is there a way to
> repeat
> a format command a spceified number of times?  For example, in Fortran
> there is the format code "20I5"  Which is the same as "I5" twenty
> times.  I want something like:
> print '20(%i5) ' % [list of 20 intgers]

Why not something like

    print ("%5d " * 20) % integerTuple

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Triumph cannot help being cruel.
\__/ Jose Ortega y Gasset
    The laws list / http://www.alcyone.com/max/physics/laws/
 Laws, rules, principles, effects, paradoxes, etc. in physics.



More information about the Python-list mailing list