I am trying to write a function that will test whether or not a list is in decending order. This is what I have so far, but it doesn\'t seem to be working for all lists. <
You should rather do the reverse check (As soon as you get A[i] < A[i+1], return false
A[i] < A[i+1]
def ordertest(A): for i in range( len(A) - 1 ): if A[i] < A[i+1]: return False return True