Question
If `x = [2, 4, 6, 8, 10]`, what is produced by `x[1:4]`?
Select an option. Your answer will be checked instantly.
Correct Answer: B. `[4, 6, 8]`
Explanation:
A slice includes the start index but excludes the stop index. Indices 1, 2, and 3 contain 4, 6, and 8.
Leave a Reply