关于python中的对象可变不可变问题
pull/37/head
lucky8888 6 years ago committed by GitHub
parent 70bae0fd1e
commit b7302bcdfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -114,7 +114,7 @@ dt2 = dt1.replace(minute = 0, second = 30)
diff = dt1 - dt2
```
**Python 中的绝大多数对象都是可变的,只有字符串和元组例外。**
**Python中的不可变对象只有`numbers`,`str`,`tuple`。 可变Mutable与不可变Immutable关键在于对象初始化之后内存`id`会不会改变**
## 数据结构

Loading…
Cancel
Save