Forum Discussion
baxatob
8 years agoCommunity Hero
Hi,
Using Python as a scripting language, you can make a simple check:
def is_sorted(arr):
if arr == sorted(arr):
return True
else:
return False
arr = ['d', 'c', 'a', 'e', 'b']
is_sorted(arr)
>> False
arr = ['a', 'b', 'c', 'd', 'e']
is_sorted(arr)
>> True