Re: [Tutor] format command help

2014-10-07 Thread Alan Gauld
On 07/10/14 14:40, Richard Dillon wrote: I create column headings using \t print('base1\tbase2\theight\tarea') and I would like the numbers to align with the headings. > I think that I need to use format instead of doing this: Yes, using tabs is a bit hit and miss depemding on the lengt

[Tutor] format command help

2014-10-07 Thread Richard Dillon
I create column headings using \t print('base1\tbase2\theight\tarea') and I would like the numbers to align with the headings. I think that I need to use format instead of doing this: print(A,' ',B,' ',C,' ',int(area1)) print(D,' ',E,' ',F,' ',int(area2)) b