Suppose on the following example:
a='a'
while multiplying by an integer both a*2 and 'a' *2 yields same result
>>a*2
'aa'
>>'a' *2
'aa'
however this does not hold same for comparing:
>>a*2 is 'aa'
False
>>'a' * 2 is 'aa'
True
>> a*2 is 'a' *2
False