Dictionary size reduces upon increasing one element

后端 未结 0 642
南旧
南旧 2021-02-12 16:46

I ran this:

import sys

diii = {\'key1\':1,\'key2\':2,\'key3\':1,\'key4\':2,\'key5\':1,\'key6\':2,\'key7\':1}
print sys.getsizeof(diii)
# output: 1048

diii =          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题