Checkpoint 28.2.1.
Which of these changes to the program would give you just the items at odd indexes in a list? (indexes 1, 3, 5… which are for the values 9, 10, 10, 4 in the list above)
- Change the range to range(0, len(numbers), 3)
- No, that would access indexes 0, 3, 6…
- Change the range to range(1, len(numbers), 2)
- Yes, just by starting at 1, then skipping 2 each time, we’d collect the odds
- Change the range to range(0, len(numbers), 1)
- No, that would access indexes 1, 2, 3…
- Change the range to range(1, len(numbers), 3)
- No, that would access indexes 1, 4, 7…