From: "Jesús Gabriel y Galán" Date: 2012-10-02T17:01:52+09:00 Subject: Re: how to read arrary with an array On Tue, Oct 2, 2012 at 9:50 AM, Richard D. wrote: > Thanks for replies. I at least understand it much better between the > two posts and understand the code for the program. > > So confirm my basic understanding, basically in this case the each inner > array would be a row, and each item would fall into some kind of column, > to use a spread sheet reference. So it would read > col 1, col2 > row1 Getting, 1 > row2 Numbers, 9 > row3 Letters, 13. Basically yes, just the indices start with 0. So an array with three elements will have elements at 0, 1 and 2. > Later the author just made the variables to reference just the columns; > name: go to first column > page: go to second column. > > The author explained that an array is just a set of data. He just > didn't explain how an array within an array worked, but briefly showed > it existed. You just need to know that when you access a position of an array, it returns whatever object sits there. It could be another array: array_of_arrays = [ [1,2,3], [4,5,6]] first_array = array_of_arrays[0] # get the object that sits at the first position of the array Now, first_array is another array, that behaves the same. Jesus.