Re: Simple list problem that's defeating me!

2010-06-24 Thread Bruno Desthuilliers
Neil Webster a écrit : Thanks for the help so far. The background to the problem is that the lists come from reading a dbf file. The code that I am trying to write is to merge lines of the dbf based on the first column. So in my example there would be three lines: a 2 3 4 b 10 11 12 a 2 3 4 T

Re: Simple list problem that's defeating me!

2010-06-24 Thread Sion Arrowsmith
Mark Lawrence wrote: >On 22/06/2010 15:06, Neil Webster wrote: >> I have a list of lists such as [[a,2,3,4],[b,10,11,12], [a,2,3,4]]. I >> need to combine the two lists that have the same first character in >> this example 'a'. In reality there are 656 lists within the list. >> [ ... ] >My simp

Re: Simple list problem that's defeating me!

2010-06-24 Thread Neil Webster
Thanks for the help so far. The background to the problem is that the lists come from reading a dbf file. The code that I am trying to write is to merge lines of the dbf based on the first column. So in my example there would be three lines: a 2 3 4 b 10 11 12 a 2 3 4 The expected output from t

Re: Simple list problem that's defeating me!

2010-06-22 Thread Bruno Desthuilliers
Neil Webster a écrit : Hi all, I've got a simple problem but it's defeated me and I was wondering if somebody could point out where I'm going wrong 1/ not posting working code (got a NameError) 2/ not posting the expected output 3/ not posting the actual output or offer an alternative soluti

Re: Simple list problem that's defeating me!

2010-06-22 Thread Mark Lawrence
On 22/06/2010 15:06, Neil Webster wrote: Hi all, I've got a simple problem but it's defeated me and I was wondering if somebody could point out where I'm going wrong or offer an alternative solution to the problem? I have a list of lists such as [[a,2,3,4],[b,10,11,12], [a,2,3,4]]. I need to c

Re: Simple list problem that's defeating me!

2010-06-22 Thread James Mills
On Wed, Jun 23, 2010 at 12:06 AM, Neil Webster wrote: > I've got a simple problem but it's defeated me and I was wondering if > somebody could point out where I'm going wrong or offer an alternative > solution to the problem? Is this a hypothetical/mathematical problem of sorts ? If so, do you ha

Re: Simple list problem that's defeating me!

2010-06-22 Thread Xavier Ho
On 23 June 2010 00:06, Neil Webster wrote: > Hi all, > > I've got a simple problem but it's defeated me and I was wondering if > somebody could point out where I'm going wrong or offer an alternative > solution to the problem? > > I have a list of lists such as [[a,2,3,4],[b,10,11,12], [a,2,3,4]]

Simple list problem that's defeating me!

2010-06-22 Thread Neil Webster
Hi all, I've got a simple problem but it's defeated me and I was wondering if somebody could point out where I'm going wrong or offer an alternative solution to the problem? I have a list of lists such as [[a,2,3,4],[b,10,11,12], [a,2,3,4]]. I need to combine the two lists that have the same fir