Checking if the number contain only 0 , 1 , 8.
for i in range ( len ( S ) ) : NEW_LINE INDENT if ( S [ i ] != '1' and S [ i ] != '0' and S [ i ] != '8' ) : NEW_LINE INDENT return " No " ; NEW_LINE DEDENT DEDENT start = 0 ; NEW_LINE end = len ( S ) - 1 ; NEW_LINE