GCSE Python · Lesson 5 of 9Two-dimensional lists and nested loops
OCR J277 2.2 / AQA 8525 programming
Calculate row totals and the largest score in a grid.
← All GCSE Python lessons Two-dimensional lists
A two-dimensional list stores rows of related values, such as marks for multiple students. Nested loops can process each row and each item inside it. Sketch a small grid and map each row and column index to the corresponding cell.
Watch out: Not every row must have the same length. Do not assume a fixed number of columns unless the data guarantees it.
A free TutorSyntax programming lesson. About our teaching approach.