You have the following array: arr = [54, 23, 1, 76, 8, 45, 10, 3]. Your task is to obtain an array [76, 8, 45] using array slicing. However, you should only use negative indices.
arr = [54, 23, 1, 76, 8, 45, 10, 3]
[76, 8, 45]
Select the correct answer
arr[5:2]
arr[-5:2]
arr[5:-2]
arr[-5:-2]
How can we improve it?
Thanks for your feedback!
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Swipe to show menu