Skip to content
CodeItRaw
Code Reading
/
Is It Sorted?
Path
Play
Daily
Leaderboard
tr
Break the Code
Is It Sorted?
Write a list for which this function gives the wrong answer.
1
def
is_sorted
(values):
2
for
i
in
range
(
1
,
len
(values)):
3
if
values[i -
1
] >= values[i]:
4
return
False
5
return
True