Consider the two scenarios:
>>> a = "python is cool!"
>>> b = "python is cool!"
>>> a is b
False
and
>>> a = "python"
>>> b = "python"
>>> a is b
True # a and b refer to the same object!
I am wondering why string interning occurs in the second scenario but not the first. Is is due to the exclamation mark or the general length? Thanks!