Skip to content
Code ReadingIs It Sorted?
Break the Code

Is It Sorted?

Write a list for which this function gives the wrong answer.
1def is_sorted(values):
2 for i in range(1, len(values)):
3 if values[i - 1] >= values[i]:
4 return False
5 return True