Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if sorted(list)==list:
- print("list is sorted smallest to largest")#or do something else
- elif sorted(list)==reversed(list):
- print("list is sorted largest to smallest")#or do something else
- else:
- print("list is not sorted")#or do something else
Add Comment
Please, Sign In to add comment