For other digits , any digit i can be placed which satisfies abs ( prev1 - i ) <= abs ( prev1 - prev2 )
else : NEW_LINE INDENT diff = abs ( prev2 - prev1 ) NEW_LINE for i in range ( 0 , 10 ) : NEW_LINE DEDENT