store the digits in an array
digit . append ( n % 10 ) NEW_LINE n /= 10 NEW_LINE digit . reverse ( ) NEW_LINE flag = True NEW_LINE n = digit [ 0 ] NEW_LINE for i in range ( 1 , len ( digit ) , 1 ) : NEW_LINE