Gary Coulbourne on 8 Oct 2004 01:29:02 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] python string formatting


On Thu, 7 Oct 2004, Jeff Abrahamson wrote:

>     for d in ar:
>         print "%10d" % d
>
> But neither prints to a single line.

print, in python, can be made to print on a single line by adding a , to
the end of it... like:

for d in ar:
    print "%10d" % d,

Dunno if that helps in your overall question...

Peace,
Gary

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug