get first 3 elements of array python code example
Example 1: get first element of array python
some_array[0]
Example 2: python get first n elements of list
l = [1, 2, 3, 4, 5]
print(l[:3])
some_array[0]
l = [1, 2, 3, 4, 5]
print(l[:3])