I understand that tuples are immutable objects. Therefore I cannot change an element of a tuple (unless I create a new tuple). However, if I have:
my_tuple = (1, 2, [3, 4])
and then I try to modify the 3rd element only with the extend() method:
my_tuple[2].extend([5, 6])
I see that my tuple is now (1, 2, [3, 4, 5, 6])
and python doesn't throw an error. I understand I have modified a list, which is mutable. But the list is inside the tuple, so it should be immutable. Doesn't this behaviour violate the immutability of tuples?