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

2005-06-20 Thread jfouhy
Quoting János Juhász <[EMAIL PROTECTED]>: > That I don't know is the asterisk in zip(*[labels] + rows) > I wasn't able to find in the python reference what it means. > May you help me in that ? You can find it in the language reference: http://docs.python.org/ref/calls.html Basically, suppose yo

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

2005-06-20 Thread János Juhász
cc 2005.06.17 19:59 Sub

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

2005-06-17 Thread Alan G
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. >>> tda = [['1', '2 ', '3'], ['longer ', 'longer', 'sort']] >>> mcw = [[len(r)

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

2005-06-17 Thread János Juhász
Thanks for jfouhy and Kent! Both the zip and the recipe are suit for me. I looked for these. Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

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

2005-06-17 Thread János Juhász
János Juhász <[EMAIL PROTECTED]> 2005.06.17 13:35 cc tutor@python.org

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

2005-06-17 Thread Kent Johnson
János Juhász wrote: > 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 n

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

2005-06-17 Thread jfouhy
Quoting János Juhász <[EMAIL PROTECTED]>: > > 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 w

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

2005-06-17 Thread Kent Johnson
Max Noel wrote: > On Jun 17, 2005, at 11:58, János Juhász wrote: >>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. > > >

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

2005-06-17 Thread Max Noel
On Jun 17, 2005, at 11:58, János Juhász wrote: > > 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 t

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

2005-06-17 Thread =?ISO-8859-1?Q?J=E1nos_Juh=E1sz?=
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