Two-dimensional arrays
A 2D array stores data in rows and columns like a table. Use the row index first, then the column index, to reach one element, such as a seat in a seating plan.
Understanding Two-dimensional arrays in VCE Software Development U3O1
What it does: The outer list holds the rows, so len(timetable) counts how many rows the grid has. board[1][2] selects row 1, column 2, and assigning to it replaces that single cell with the new value. A two-dimensional array is like a table or grid, with rows going across and columns going down. The row index always comes first, then the column index: seats[row][col]. A 2D array in Python is a list of lists. Each inner list is one row, and here each row holds 3 columns. Rows x columns = 3 x 3 = 9 elements. Adding them (3 + 3) is a common mistake.
Common mistakes: Each row has 3 columns, so valid column indexes are 0, 1 and 2. Column 3 gives an IndexError. It should be col = 2. The outer list is missing its closing bracket, so the board is a syntax error. The line should end with ]] so both rows are inside the outer list.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 72–96) and word search (Modules 72–113).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
grid[row][col]Fill in the Blanks
Spot the Error
Student with a class code? Join your class →