-
>>> x =
1
-
>>> id(x)
-
31106520
-
>>> y =
1
-
>>> id(y)
-
31106520
-
>>> x =
2
-
>>> id(x)
-
31106508
-
>>> y =
2
-
>>> id(y)
-
31106508
-
>>> z = y
-
>>> id(z)
-
31106508
-
>>> x +=
2
-
>>> id(x)
-
31106484
-
>>> a = [
1,
2,
3]
-
>>> id(a)
-
41568816
-
>>> a = [
1,
2,
3]
-
>>> id(a)
-
41575088
-
>>> a.append(
4)
-
>>> id(a)
-
41575088
-
>>> a += [
2]
-
>>> id(a)
-
41575088
-
>>> a
-
[
1,
2,
3,
4,
2]