Skip to content

Commit c78e93f

Browse files
committed
Minor corrections
1 parent af892b4 commit c78e93f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

_episodes/04-lists.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,15 @@ does not.
178178
> ~~~
179179
> {: .language-python}
180180
>
181-
> Here are some visual examples of how indexing a list of lists `x` works.
181+
> Here are some visual examples of how indexing a list of lists `x` works. First,
182+
> we can reference each row on the shelf as a separate list. For example, x[2]
183+
> represents the list of baskets on the third row of the shelf.
182184
>
183185
> [![x is now shown as a list of four rows, with x[0] representing the top row of
184186
> five baskets, x[1] representing the second row, x[2] representing the third row,
185187
> and x[3] representing the bottom row.](../fig/04_groceries_x0.png)]
186188
>
187-
> Using the previously declared list `x`, these would be the results of the
188-
> index operations shown in the image. Each row on the shelf is a separate list:
189+
> Index operations using the image would work like this:
189190
>
190191
> ~~~
191192
> print(x[2])
@@ -210,8 +211,7 @@ does not.
210211
> To reference a specific basket on a specific shelf, we use two indexes. The first
211212
> index represents the row (from top to bottom) and the second index represents
212213
> the specific basket (from left to right).
213-
>
214-
[![x is now shown as a two-dimensional grid, with each basket labeled according to
214+
> [![x is now shown as a two-dimensional grid, with each basket labeled according to
215215
> its index in the nested list. The first index is the row number and the second
216216
> index is the basket number, so x[1][4] represents the basket on the far right
217217
> side of the second row (basket 4 on row 1): parsley](../fig/04_groceries_x00.png)]

0 commit comments

Comments
 (0)