Check if Numbers Are Ascending in a Sentence
class Solution:
def areNumbersAscending(self, s: str) -> bool:
letter = [int(i) for i in s.split() if i.isdigit()] # splitting & checking the if it's digit
for i in range(len(letter)):
for j in range(i + 1, len(letter)):
if letter[i] >= letter[j]:
return False
return True