import sys
a = {"a":1, "b":2}
b = "cdefgh"
c = "b"
sys.getsizeof(a)
sys.getsizeof(b)
sys.getsizeof(c)
out:
240
55
50
import sys
a = {"a":1, "b":2}
b = "cdefgh"
c = "b"
sys.getsizeof(a)
sys.getsizeof(b)
sys.getsizeof(c)
out:
240
55
50
本文标题:python数据分析基础(23)-查看变量所占字节数
本文链接:https://www.haomeiwen.com/subject/kietvhtx.html
网友评论