In python lists can be sliced like this x[4:-1] to get from the fourth to the last element.
x[4:-1]
In R something similar can be accomplished for vectors with
In case you are interested in slicing the last n elements of the array then you could use:
x[seq(length=n, from=length(x), by=-1)]