Just adding to @David Meus answer
You can do
ist_numbers[min(len(ist_numbers)-1,ist_numbers.index(<element>)+1)]
such that you the last element returns the last element.
Otherwise you can use a try/catch with his answer (wrapped in a function)
def get_next_element(ele,l):
"""
Returns the next element in the list "l" after the provided element "ele"
"""
try:
print(l[l.index(ele) + 1])
except IndexError:
raise ValueError(f"'{ele}' is the last element in the list")
get_next_element("l1.pkl",ist_numbers) #"l2.pkl"
get_next_element("l10.pkl",ist_numbers) #ValueError: 'l10.pkl' is the last element in the list