You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{alt='Heat map representing the data variable. Each cell is colored by value along a color gradientfrom blue to yellow.'}
51
+
{alt='Heat map representing the data variable. Each cell is colored by value along a color gradient from blue to yellow.'}
52
52
53
53
Each row in the heat map corresponds to a patient in the clinical trial dataset, and each column
54
54
corresponds to a day in the dataset. Blue pixels in this heat map represent low values, while
Copy file name to clipboardExpand all lines: 04-lists.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,7 @@ Since a list can contain any Python variables, it can even contain other lists.
169
169
For example, you could represent the products on the shelves of a small grocery shop
170
170
as a nested list called `veg`:
171
171
172
-
{alt='veg is represented as a shelf full of produce. There are three rows of vegetableson the shelf, and each row contains three baskets of vegetables. We can labeleach basket according to the type of vegetable it contains, so the top rowcontains (from left to right) lettuce, lettuce, and peppers.'}
172
+
{alt='veg is represented as a shelf full of produce. There are three rows of vegetables on the shelf, and each row contains three baskets of vegetables. We can label each basket according to the type of vegetable it contains, so the top row contains (from left to right) lettuce, lettuce, and peppers.'}
173
173
174
174
To store the contents of the shelf in a nested list, you write it this way:
175
175
@@ -183,7 +183,7 @@ Here are some visual examples of how indexing a list of lists `veg` works. First
183
183
you can reference each row on the shelf as a separate list. For example, `veg[2]`
184
184
represents the bottom row, which is a list of the baskets in that row.
185
185
186
-
{alt='veg is now shown as a list of three rows, with veg\[0\] representing the top row ofthree baskets, veg\[1\] representing the second row, and veg\[2\] representing the bottom row.'}
186
+
{alt='veg is now shown as a list of three rows, with veg\[0\] representing the top row of three baskets, veg\[1\] representing the second row, and veg\[2\] representing the bottom row.'}
187
187
188
188
Index operations using the image would work like this:
189
189
@@ -206,7 +206,7 @@ print(veg[0])
206
206
To reference a specific basket on a specific shelf, you use two indexes. The first
207
207
index represents the row (from top to bottom) and the second index represents
208
208
the specific basket (from left to right).
209
-
{alt='veg is now shown as a two-dimensional grid, with each basket labeled according toits index in the nested list. The first index is the row number and the secondindex is the basket number, so veg\[1\]\[3\] represents the basket on the far rightside of the second row (basket 4 on row 2): zucchini'}
209
+
{alt='veg is now shown as a two-dimensional grid, with each basket labeled according to its index in the nested list. The first index is the row number and the second index is the basket number, so veg\[1\]\[3\] represents the basket on the far right side of the second row (basket 4 on row 2): zucchini'}
0 commit comments