[Tutor] max(len(item)) for cols

János Juhász janos.juhasz at VELUX.com
Fri Jun 17 12:58:05 CEST 2005

Dear Guys,

I have a 2D array:
>>>[['1', '2 ', '3    '], ['longer     ', 'longer    ', 'sort']]

How can I  get what is the max(len(item)) for the columns ?
I would like to get a list with the max_col_width values.

I hope that, it can wrote with some nice list comprehension, but I can't do
that :(

Yours sincerely,
János Juhász

More information about the Tutor mailing list