On Mon, Dec 19, 2011 at 7:53 PM, Tom Zhou <py...@yahoo.cn> wrote:
> Hi~ alls
> recently, i focus on the module "cmd", and find some confused things-- the
> function named "columnize". Why we need a multiloop as
> "for nrows ..
>         for col ..
>                    for row.."
> ?? i think we can make a easier method, for example, first, find out the
> maxlen str in list, and use its length as the standard size to format the
> list.
> Ok, maybe i ignore something, so please give me some hints.

The columns can have different widths.  Finding the single longest
string in the list and using its length for all columns would
potentially waste a lot of space.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to