pretty simple question I guess, sorry I'm pretty new to Python. So I have a given list and want to iterate through it. I want to compare every item in the list to the upcoming one. Unfortunately it does not work for me.
values = [45, 24, 35, 31, 40, 38, 11]
for i in values:
if values(i+1) > values(i):
print(str(i+1) + " > " + str(i))
else:
print(str(i+1) + " < " + str(i))
(As an example, for the first step I would want to have 45 compared to 24)