I've looked for a solution for this for a little while, and while i have snippets of understanding, i can't quite get it to work as expected. I'm hoping i could get some insight:
So i have a list that contains numbers:
refl = ["100", "99", "90", "80", "60", "50", "10"]
I want to find out if the first item is larger than the second, if the second is larger than the third, the third larger than the fourth etc.
I guess i'm struggling with how to capture the initial list object to compare it to the next...?
Any help would be greatly appreciated,
****EDIT TO ADD FUNCTION*****
I have the following function:
refl = ["100", "99", "90", "80", "60", "50", "10"]
def funcc(refl):
if (refl[0]) > (refl[1]):
print("more")
else:
print("less")
How would i get the function to run through each object in the list without implicitly specifying if [1] > [2], [2] > [3] etc
Many Thanks,