python-questions
1.__sizeof__与len的区别
>>> a = range(3) >>> a.__sizeof__() 24 >>> len(a) 3
>>> a.__sizeof__.__doc__
'__sizeof__() -> int\nsize of object in memory, in bytes'
1.__sizeof__与len的区别
>>> a = range(3) >>> a.__sizeof__() 24 >>> len(a) 3
>>> a.__sizeof__.__doc__
'__sizeof__() -> int\nsize of object in memory, in bytes'