Is `namedtuple` really as efficient in memory usage as tuples? My test says NO
问题 It is stated in the Python documentation that one of the advantages of namedtuple is that it is as memory-efficient as tuples. To validate this, I used iPython with ipython_memory_usage. The test is shown in the images below: The test shows that: 10000000 instances of namedtuple used about 850 MiB of RAM 10000000 tuple instances used around 73 MiB of RAM 10000000 dict instances used around 570 MiB of RAM So namedtuple used much more memory than tuple ! Even more than dict !! What do you think