Dictionary size reduces upon increasing one element

后端 未结 0 1603
无人共我
无人共我 2021-02-12 17:22

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 =          


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