[Tutor] string formatting problem

Ron A clickron@webtv.net
Sun Aug 3 11:23:02 EDT 2003


I have this in a little program , and when it prints it goes to another
line when it gets to the last part of the string. 

 print  "%s  PN  %s   %s   %0.2f" % (a, x, z[2], a*b) 

It prints like this.
                
88   PN   1118   0.21 
   18.48

I only have 4 spaces between each. Why would it split like this, and how
do I fix it?

Ron A





More information about the Tutor mailing list