python数据存储特点
一、总结
一句话总结:
python对已经存储的内容,再次出现会用原地址
str1="abcdbaba" for i in str1: print(str1.index(i),i,id(i)) 0 a 21576832 1 b 21609856 2 c 21531296 3 d 21532256 1 b 21609856 1 b 21609856 2 c 21531296 3 d 21532256 1 b 21609856 0 a 21576832 1 b 21609856 0 a 21576832
二、python数据存储特点
博客对应课程的视频位置: