Alan Gauld wrote:
> "Scott Oertel" <[EMAIL PROTECTED]> wrote
>
>   
>> and you want to sort and output the text into columns as such:
>>
>> a              p               j             b              n
>> apple      python     john       bean       nice
>> ample                      joke
>>
>> and this is what works, but I would also like to know how to wrap 
>> the
>> columns, plus any ideas on a better way to accomplish this.
>>     
>
> Use format strings. You can calculate the column widths by analyzing
> the data then create a format string for the required number of 
> columns.
> Finally insert the data on each row from a tuple.
>
>
> HTH,
>
>
>   
Do you have any good documentation that could shed some more light on
exactly how to use format strings in such a way?


-Scott Oertel
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to