Why does a space affect the identity comparison of equal strings?
I’ve noticed that adding a space to identical strings makes them compare unequal using is, while the non-space versions compare equal. a = 'abc' b = 'abc' a is b #outputs: True a = 'abc abc' b = 'abc abc' a is b #outputs: False I have read this question about comparing strings with == … Read more