Closed squarebat closed 4 years ago
is_sorted checks if a list or tuple is sorted in ascending or descending order.
1
-1
0
is_sorted checks if a list or tuple is sorted in ascending or descending order.
1
if list is sorted in ascending order.-1
if list is sorted in descending order.0
if list is not sorted.