A shelf needs two directions
Picture
“Second shelf, first box.” Sometimes one position isn’t enough. In a table, a row and a column together tell us which cell to use.
Predict
Python starts counting at zero. Which row number means the second row?
Let's look
Row 1. Row 0 is the first row.
A little Python, if you want it
shelves = [["cup", "plate"], ["book", "pen"]]
assert shelves[1][0] == "book"
assert shelves[0][1] == "plate"
The first pair of brackets picks a row. The second picks an item in that row. A third coordinate could choose which cupboard contains those shelves. Extra dimensions can simply mean extra labels, not mysterious geometry.
Change one rule
There are two identical cupboards. Are row and column enough to name one box?
Let's try it
No. We also need the cupboard. Three labels now identify the box: cupboard, row, column.
Connect
Next, choose what information to remember. Later, 2D DP and 3D DP will use this same idea.