I'm trying to get this code to associate True with the variable is_ascending if the list numbers is in ascending order and False if otherwise
for i in range(2, len(numbers)) :
if numbers[i] < numbers[i-1] :
is_ascending = False
break
else :
is_ascending = True
But the program im doing, this is for a class, says this won't work. Any help would be appreciated