Re: Two dimensional lists

2007-01-25 Thread Travis Oliphant
Laszlo Nagy wrote: >># shouldn't I be able to fill the lists simply by pointing to a location? >> >>matrix[a_idx, p_idx] = 0x219 # and so on? >> > > Lists are not matrices. For example: > > L = [ [1,2,3], ['a','b','c'], 10 ] > print L[1][2] # Prints 'c', you will like this syntax but... > prin

Re: Two dimensional lists

2007-01-25 Thread Peter Otten
gonzlobo wrote: > I might get an answer since I didn't call them arrays. :^) > > Ok, I have 2 lists that I need to process individually, then merge > them into a 2x list and fill with data. > > arinc429 = ['ab', '2b', '0b', '21', 'c1', '61', '11', 'db', '9b', '5b', > 'eb', > '6b', '1b',

Re: Two dimensional lists

2007-01-25 Thread Laszlo Nagy
> # shouldn't I be able to fill the lists simply by pointing to a location? > > matrix[a_idx, p_idx] = 0x219 # and so on? > Lists are not matrices. For example: L = [ [1,2,3], ['a','b','c'], 10 ] print L[1][2] # Prints 'c', you will like this syntax but... print L[2][5] # TypeError: 10 is not

Two dimensional lists

2007-01-25 Thread gonzlobo
I might get an answer since I didn't call them arrays. :^) Ok, I have 2 lists that I need to process individually, then merge them into a 2x list and fill with data. arinc429 = ['ab', '2b', '0b', '21', 'c1', '61', '11', 'db', '9b', '5b', 'eb', '6b', '1b', '6e', '3e'] iPIDs = [300, 301, 3