Q. What does the following slice return? `a = [1, 2, 3, 4, 5]` `a[1:4]`
Code:a = [1, 2, 3, 4, 5]
β
Correct Answer: (B)
[2, 3, 4]
Explanation: Slice includes index 1 up to but not including index 4.