check if the digit is greater than the previous one If true , then break from the loop as we are in descending order part
if ( prev < n % 10 ) : NEW_LINE INDENT flag = False ; NEW_LINE break ; NEW_LINE DEDENT prev = n % 10 ; NEW_LINE n = int ( n / 10 ) ; NEW_LINE return flag ; NEW_LINE