id () gives essentially a memory pointer to data. Although the strings are immutable, they do not guarantee internment. This means that some lines with equal values have different pointers.
( ) , 3 .
@KartikAnand: , " ", , x is y. , . . , "__main__", . python , .
Kartik , ", , " ". ( ).
>>> __name__
'__main__'
>>> x = __name__
>>> id(__name__)
3078339808L
>>> id(x)
3078339808L
>>> __name__ is x
True