Check the last digit of both numbers and increase count if different
if ( ( a % 10 ) != ( b % 10 ) ) : NEW_LINE INDENT c += 1 NEW_LINE DEDENT a = int ( a / 10 ) NEW_LINE b = int ( b / 10 ) NEW_LINE if ( c == 1 ) : NEW_LINE return True NEW_LINE else : NEW_LINE return False NEW_LINE def makePrimes ( N ) : NEW_LINE global primes NEW_LINE global lis NEW_LINE i = 0 NEW_LINE j = 0 NEW_LINE