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
Copy file name to clipboardExpand all lines: backend/main/chapters/c06_lists.py
+3-6Lines changed: 3 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1175,7 +1175,7 @@ class HowToFindInformationWithGoogleAndMore(Page):
1175
1175
1176
1176
classsum_list(Step):
1177
1177
"""
1178
-
It's useful to know these functions, but it's not easy to learn them all, and there's many more. A more important skill is being able to look things up. For example, here are some typical ways you might Google the above functions if you forgot their names:
1178
+
It's useful to know the functions we just covered, but it's not easy to learn them all, and there's many more. A more important skill is being able to look things up. For example, here are some typical ways you might Google the above functions if you forgot their names:
1179
1179
1180
1180
- `append`
1181
1181
- python add element to list
@@ -1184,9 +1184,6 @@ class sum_list(Step):
1184
1184
- python size of list
1185
1185
- python number of elements in list
1186
1186
- python how many characters in string
1187
-
- `join`
1188
-
- python combine list of strings with separator
1189
-
- python add together list of strings with string in between
1190
1187
- `sum`
1191
1188
- python add list of numbers
1192
1189
- python total of numbers
@@ -1197,7 +1194,7 @@ class sum_list(Step):
1197
1194
- python get position of element
1198
1195
- python get index of value
1199
1196
1200
-
Let's practice this skill now. Find a function/method that returns the value in a list which is bigger than any other value. For example, given the list `[21, 55, 4, 91, 62, 49]`, it will return `91`. You should write the answer in the shell as a single small expression. For example, if you were looking for the function `sum`, you could write `sum([21, 55, 4, 91, 62, 49])`. Don't solve this manually with a loop.
1197
+
Let's practice this skill now. Find a function/method that returns the value in a list which is bigger than any other value. For example, given the list `[21, 55, 4, 91, 62, 49]`, it will return `91`. You should write the answer in the shell as a single small expression. For example, if you were looking for the function `sum`, you could write `sum([21, 55, 4, 91, 62, 49])`. Don't solve this manually with a loop. Note that the function you're looking for hasn't been mentioned here before.
1201
1198
"""
1202
1199
1203
1200
hints="""
@@ -1231,7 +1228,7 @@ class list_insert(Step):
1231
1228
1232
1229
[1, 2, 9, 3, 4, 5]
1233
1230
1234
-
Replace the middle line (i.e. the call to `append`) with the right function/method call to do that.
1231
+
Replace the middle line `nums.append(9)` with the right function/method call to do that.
0 commit comments