end of an array python code example Example: how to get the end of a item in a python array array = [1, 2, 3, 4, 5] print(array[-1])