I've been using Python for some time already and today while reading the following code snippet:
>>> a = (1,2)
>>> a += (3,4)
>>> a
(1, 2, 3, 4)
I asked myself a question: how come python tuples are immutable and I can use an += operator on them (or, more generally, why can I modify a tuple)? And I couldn't answer myself.
I get the idea of immutability, and, although they're not as popular as lists, tuples are useful in python. But being immutable and being able to modify length seems contradictory to me...