标签: python
我很好奇,为什么这些列表的大小不一样?
from sys import getsizeof a = list(1 for i in range(10)) print(getsizeof(a)) # prints 84 b = [1 for j in range(10)] print(getsizeof(b)) # prints 100 c = [1] * 10 print(getsizeof(c)) # prints 76