1、可变对象
python中,数值类型、字符串、元组都是不可变数据类型,列表、字典、集合属于可变数据类型。
对象中包含以下三个数据:
- id(地址)
- type
- value
In [34]: tup=1,
In [35]: tup??
Type: tuple
String form: (1,)
Length: 1
Docstring:
tuple() -> empty tuple
tuple(iterable) -> tuple initialized from iterable's items
If the argument is a tuple, the return value is the same object.
In [36]