Answers for "check if list is in ascending order python"

0

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:)
Posted by: Guest on February-21-2021

Code answers related to "check if list is in ascending order python"

Python Answers by Framework

Browse Popular Code Answers by Language