I've tried sorted, value_sort, all(a, b...zip), etc. but my function to check if the list is sorted, "is_solved" will not work. The function should check if the list of marbles is sorted in ascending order. I've commented out other approaches that I've tried that haven't worked. Any help would be most appreciated.
def is_solved(self, list_of_marbles, i):
#returns true if the game is solved
if self.list_of_marbles[i] < self.list_of_marbles[i+1]:
#all(self.list_of_marbles[i] <= self.list_of_marbles[i+1] for i
#in range(len(self.list_of_marbles)-1))
#if self.is_solved(board2, i) == True:
#if self.list_of_marbles[i] < self.list_of_marbles[i+1]:
return True
else:
return False