Initialize two variables
l = int ( pow ( 10 , N - 1 ) ) ; NEW_LINE r = int ( pow ( 10 , N ) - 1 ) ; NEW_LINE if ( l == 1 ) : NEW_LINE INDENT l = 0 ; NEW_LINE DEDENT ans = 0 ; NEW_LINE for i in range ( l , r + 1 ) : NEW_LINE INDENT even_sum = 0 ; NEW_LINE odd_sum = 0 ; NEW_LINE itr = 0 ; NEW_LINE num = reverse ( i ) ; NEW_LINE DEDENT