首先更正:str 是类(或者你叫类型也行),而 None 是 NoneType 类的对象简而言之,不可变就是你不能去修改它的值。那 None 自不用说,他是 NoneType 类的对象,并且无法修改它的值;对于 str 类的对象,str 类没有提供任何方法去修改一个对象的值,那些会修改值的方法都是新生成了一个 str 对象。所以,这些对象都是不可变的。下面是官方文档的描述:An object with a fixed value. Immutable objects include numbers, strings and tuples. Such an object cannot be altered. A new object has to be created if a different value has to be stored. They play an important role in places where a constant hash value is needed, for example as a key in a dictionary.