Section 28.6 Chapter Concept Summary
This chapter included the following concepts from computing.
- Index Based List Iteration - To modify items in a look as we iterate through them, we need to use a counting loop where we iterate through the indexes of all of the items in the list. Given the index, we can access items to read them or to modify them.
- List Slice - We can copy part of a list by making a slice using the syntax
list[startIndex:endIndex]
The slice will be a list that contains all the item fromstartIndex
up to but not includingendIndex
. We can leaveendIndex
blank to select until the end of the list. The original list will not be modified.
You have attempted of activities on this page.