Novice question: If x = [0, 1, 2, 3, 4, 5, 6, 7] and y = x[1:-1], what values does y contain?
- y = [0, 1, 2, 3, 4, 5, 6]
- y = [1, 2, 3, 4, 5, 6]
- y = [1, 2, 3, 4, 5, 6, 7]
- y = [0, 1, 2, 3, 4, 5, 6, 7]
Expert question: if x = range(10) and y = x[::3], what values does y contain?
- y = [0, 1, 2]
- y = [3]
- y = [1, 4, 7, 10]
- y = [0, 3, 6, 9]