To compare the digits
s1 = str ( num1 ) NEW_LINE s2 = str ( num2 ) NEW_LINE c = 0 NEW_LINE if ( s1 [ 0 ] != s2 [ 0 ] ) : NEW_LINE INDENT c += 1 NEW_LINE DEDENT if ( s1 [ 1 ] != s2 [ 1 ] ) : NEW_LINE INDENT c += 1 NEW_LINE DEDENT if ( s1 [ 2 ] != s2 [ 2 ] ) : NEW_LINE INDENT c += 1 NEW_LINE DEDENT if ( s1 [ 3 ] != s2 [ 3 ] ) : NEW_LINE INDENT c += 1 NEW_LINE DEDENT