Here's the array as seen in the notes:
import numpy as np my_array = np.array([1, 2, 3, 4, 5]) my_array[4] = 999
Get the first three elements:
my_array[:3]
array([1, 2, 3])
And set it back to how it was:
my_array[4] = 5 print(my_array)
[1 2 3 4 5]