← 都来码 / Dolaima← 例程索引python/school/_unsupported/067.py 原文

python/school/_unsupported/067.py · 234 字节 · 下载原文

from memory_profiler import profile

@profile
def memory_test():
    test = []
    test.append([8]*100000)
    test.append([8]*200000)
    test.append([8]*300000)
    test.append([8]*400000)
    test.append([8]*500000)

memory_test()