Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 88)
88.
Given a NumPy array arr = np.array([10, 20, 30, 40]), what does arr[1:3] return?
[10, 20]
[20, 30]
[30, 40]
[20, 30, 40]
Answer: Option
Explanation:
The slice arr[1:3] extracts elements from index 1 to (3-1).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.