variability : Refers to whether the value of an object can be changed. All Python objects have three properties: type, identifier, value, three properties are almost always read-only, and they are immutable throughout the life of the object. The only exception is the value of the object, and if the value is mutable it is a mutable object and the value immutable is the non-mutable object.
immutable object passing values, mutable objects referencing simple types or "scalar" types, including integers and other numeric types, str and Unicode string types, and tuples are immutable. The rest of the dictionaries, lists, classes, classes, etc. are variable >>> mylist1 = [1, ' A ', ['foo', ' bar ']]>>> mylist2 = list (Mylist1) > >> mylist2[0] = 2>>> mylist2[2][0] = ' biz ' >>> print mylist1[1, ' a ', ['biz', ' Bar ']]>& gt;> print mylist2[2, ' a ', ['biz', ' Bar ']] The first two object integers and strings are immutable (pass values), but the third object is a mutable list (referenced), so mylist1 also changed
I love the variability of Python's objects