If lastDigit is 9 then only possible digit after 9 can be 8 for a Stepping Number
elif ( lastDigit == 9 ) : NEW_LINE INDENT q . append ( stepNumA ) NEW_LINE DEDENT else : NEW_LINE INDENT q . append ( stepNumA ) NEW_LINE q . append ( stepNumB ) NEW_LINE DEDENT