Determine whether the sequence of items is strictly ascending so that each element is strictly larger (not just merely equal to) than the element that precedes it. Return True if the list of items is strictly ascending, and return False otherwise. Note that the empty sequence is ascending, as is also every one-element sequence, so be careful that your function returns the correct answers in these seemingly insigni0icant edge cases of this problem.
What would be the best way to check if a list is strictly ascending in Python 3?
My instructions for the task are:
Determine whether the sequence of items is strictly ascending so that each element is strictly larger (not just merely equal to) than the element that precedes it. Return True if the list of items is strictly ascending, and return False otherwise.
Note that the empty sequence is ascending, as is also every one-element sequence, so be careful that your function returns the correct answers in these seemingly insigni0icant edge cases of this problem. (If these sequences were not ascending, pray tell, what would be the two elements that violate the requirement and make that particular sequence not be ascending?).
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images