字符串对象不可变 s = 'hello world' print(s[0]) >>>结果:h s[0]='H' >>>结果: TypeError: 'str' object does not support item assignment 原因是,字符串不能根据索引来修改值