Q:

Why can you assign new value to tuples with concatenation?

Take the following code for example:
t=(1,2,3)
t+=(4,)
print(t)

The printed value is (1,2,3,4).Didn't the value of tuple t just got changed which is similar to an append/extend method for list objects?

A:

You can concatenate tuples into a new tuple. You're replacing the value of t entirely with a new value. You cannot modify an existing tuple. To illustrate:
t = (1, 2, 3)
u = t
t += (4,)  # shorthand for t = t + (4,)

t == u  # False
t is u  # False

t and u do not refer to the same object anymore.
With mutable data structures, that would not be the case:
t = [1, 2, 3]
u = t
t.append(4)

t == u  # True
t is u  # True

A:

Tuples are immutable. That is they can not be changed like lists in python.
What you are doing is, just replacing old tuple with new tuple.

A:

t += (4,) is more or less syntactical sugar. It translates to
t = t.__iadd__((4,))

(assuming this method exists. If it doesn't, it falls back to t = t + (4,)). Since tuples are immutable, at best __iadd__ would return a new tuple that gets bound to the old name t. For lists in a similar setting the returned list would be the (mutated) original.

