purid

2 D Array from Search Cursor

Discussion created by purid on Aug 22, 2012
Latest reply on Aug 22, 2012 by clthompson
Hi

I want to write 2 dimensional array from the feature, so that output will be like: [[1, 79.0, -41.0] [ 2, 23.0, -61.0] [..]] etc. I know search cursor and applied it but I am getting one list and  it is not iterated to next array: so I am getting [1, 79.0, -41.0,  2, 23.0, -61.0, ...]. I may or may not know the counts but surely I can apply getcount, if needed.


 for row in rows:
      order.append(str(row.getValue('ID')))
      order.append(str(row.getValue('POINT_X')))
      order.append(str(row.getValue('POINT_Y')))

Outcomes