Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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:)
 
PREVIOUS NEXT
Tagged: #check #list #ascending #order #python
ADD COMMENT
Topic
Name
7+2 =