If you are just looking to see if the item is last in the (or any item in any list) you could try using a function to check if an item is last in a list.
a = ['hello', 9, 3.14, 9]
def is_last(alist,choice):
if choice == alist[-1]:
print("Item is last in list!")
return True
else:
print("Item is not last")
return False
if is_last(a,9) == True:
else: