An indexable type lets a function accept values that support either a single numeric index or a slice, making one implementation useful across related data types. section 3.5
This pattern favors general functions over type-specific duplicates: one function can find the largest element in a string, list, or tuple. Slices also select subsequences, such as the final three elements with mylist[-3:]. section 3.5 section 3.5
Practice index and slice operations with:
- A function returning the sums at even and odd indexes, such as [90, 120] for [10, 20, 30, 40, 50, 60]. section 3.5
- A function that alternately adds and subtracts numbers, producing 50 from 10+20-30+40-50+60. section 3.5
- A partial implementation of the built-in zip function for multiple inputs. section 3.5

