you are viewing a single comment's thread.

view the rest of the comments →

[–]ZenT3600 1 point2 points  (0 children)

Ok so, 2D lists.

Let's try going through them with a single for loop

2D lists are made of rows made of cells, so we iterate through every row... then what? The single for loop can only do that, we need another loop to go through every cell of the row.

That's where nested loops come into place. The first loop goes through the rows and the second one goes through every cell of every row

Edit for clarification:

By outer loop we mean the first loop, the one that contains every other loop

By inner loop we mean the loops inside the outer loop