are tuples in python mutable

>>> dum = ('1861-10-23', ['poetry', 'pretend-fight'])
>>> dee = ('1861-10-23', ['poetry', 'pretend-fight'])
>>> dum == dee
True
>>> dum is dee
False
>>> id(dum), id(dee)
(4313018120, 4312991048)

Here is what the above code is Doing:
1. We create a tuple named dum and assign it the value (‘1861-10-23’, [‘poetry’, ‘pretend-fight’]).
2. We create a tuple named dee and assign it the value (‘1861-10-23’, [‘poetry’, ‘pretend-fight’]).
3. We compare dum and dee using the == operator.
4. We compare dum and dee using the is operator.
5. We print the id of dum and dee.

The output of the code is:

True
False
(4313018120, 4312991048)

The first line of output is the result of the == operator. It returns True because the two tuples have the same values.

The second line of output is the result of the is operator. It returns False because the two tuples are not the same object.

The third line of output is the id of dum and dee. The id is a unique identifier for an object. As you can see, dum and dee have different ids, which means they are different objects.