Is there a pythonic way to check if a list is already sorted in AESC or DESC.
listtimestamps=[1,2,3,5,6,7]
something like listtimestamps.isSorted() that returns True or False.
EDIT: I want to input a list of timestamps for some messages and check if the the transactions appeared in the correct order.
and I can write a custom function too :) , Thanks
EDIT: Thanks for pointing out camel case issues :)
EDIT: Also I am sorry if I wasn't clear I don't need to sort it afterwards, I just need to check if the list is sorted, I am using it to solve a decision problem