上传者: 38558655 
                                    |
                                    上传时间: 2021-07-27 17:01:11
                                    |
                                    文件大小: 33KB
                                    |
                                    文件类型: PDF
                                
                            
                                
                            
                                python中基本数据类型和其他的语言占用的内存空间大小有很大差别
import sys
a = 100
b = True
c = 100L
d = 1.1
e =""
f = []
g =()
h = {}
i = set([])
print " %s size is %d "%(type(a),sys.getsizeof(a))
print " %s size is %d "%(type(b),sys.getsizeof(b))
print " %s size is %d "%(type(c),sys.getsizeof(c))
print " %s size is %d "%(type