Empty string is a literal, in Python literals are immutable objects and there value never changes. However, in some cases two literal objects having same value can have different identities (Identity of an object is an address of the memory location in CPython and you can get it by using id(obj)) so to answer your question
print id(string) == id(str2) # Can output either True or False
print string == str2 # Will always output True
Note that most of the time id(string) should be equal to id(str2) :).
You can read about the Data Model in the Python Language Reference for further details. I am quoting the text which is pertinent to the question:
Types affect almost all aspects of object behavior. Even the
importance of object identity is affected in some sense: for immutable
types, operations that compute new values may actually return a
reference to any existing object with the same type and value, while
for mutable objects this is not allowed. E.g., after a = 1; b = 1, a
and b may or may not refer to the same object with the value one,
depending on the implementation, but after c = []; d = [], c and d are
guaranteed to refer to two different, unique, newly created empty
lists. (Note that c = d = [] assigns the same object to both c and d.)
==
to find out.is
:-)is
actually returns True in this caseis
. We don't want more dupes of those questions :-)