how to check if an array is in ascending order python code example
Example: check if list is in ascending order python
n = list(map(int, input().split())) #assign list values from input
if sorted(n) == n: #for descending, use sorted(n, reverse=True)
print("Yes")
else:
print("No")
#Hope this helps:)