码迷,mamicode.com
首页 > 其他好文 > 详细

【番外篇】回顾&类的静态字段

时间:2016-09-20 13:43:45      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:

2016-09-20

回顾

 

 

回顾:字符串、列表、字典的修改关于内存的情况

一、字符串

str1 = ‘luotianshuai‘
str2 = str1
print id(str1)
print id(str2)
print ‘===========================‘
str1 = ‘shuaige‘
print id(str1)
print id(str2)

#输出结果:
‘‘‘
38807904
38807904
===========================
39795488
38807904
‘‘‘

 

  

 

 

【番外篇】回顾&类的静态字段

标签:

原文地址:http://www.cnblogs.com/robinunix/p/5888332.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!