@author jackzhenguo @desc @date 2019/3/4 48 查看变量所占字节数 In [1]: import sys In [2]: a = {'a':1,'b':2.0} In [3]: sys.getsizeof(a) # 占用240个字节 Out[3]: 240