Re: [Tutor] 2d list matrix 7 x 75 problem

2005-03-06 Thread Max Noel
On Mar 6, 2005, at 09:49, Dave S wrote: so I thought I would be clever with ... >>> a=[0]*5 >>> a [0, 0, 0, 0, 0] >>> b=[a[:]]*5 same problem. It seems realy simple but how do I generate a 7 x 75 list matrix ? Dave Try this: >>> a = [''] * 5 >>> b = [a[:] for i in range(5)] >>> b [['', '', '',

Re: [Tutor] 2d list matrix 7 x 75 problem

2005-03-06 Thread Dave S
Jeff Shannon wrote: On Sun, 06 Mar 2005 09:49:43 +, Dave S <[EMAIL PROTECTED]> wrote: I need to generate a list 2d matrix of the kind ... [['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', '']] except its dimensions need to be 7 x 75. I

Re: [Tutor] 2d list matrix 7 x 75 problem

2005-03-06 Thread Jeff Shannon
On Sun, 06 Mar 2005 09:49:43 +, Dave S <[EMAIL PROTECTED]> wrote: > I need to generate a list 2d matrix of the kind ... > > [['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', > '', '', '', ''], ['', '', '', '', '']] > > except its dimensions need to be 7 x 75. I thought

[Tutor] 2d list matrix 7 x 75 problem

2005-03-06 Thread Dave S
Hello, I need to generate a list 2d matrix of the kind ... [['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', '']] except its dimensions need to be 7 x 75. I thought I had it sorted with map2 = [ [''] *7 ] *75 until the coding screwed up & I