import numpy as np
a=[1,2,3.4,5]
print(a)
[ 1 2 3 4 5 ]
print(a[-1]) # Forward reading the last element
[5]
print(a[:-1]) # Forward read all except the last one
[ 1 2 3 4 ]
print(a[::-1]) # Read all elements in reverse
[ 5 4 3 2 1 ]
print(a[2::-1]) # Reverse from the third element ( Reverse subscript 2) Start reading , Until all
[ 3 2 1 ]
original text