如需对内存加压 a = [] while True: print len(a) a.append(' ' * 10**6) 将上述脚本保存成*.py文件,然后python *.py 最后Ctrl C退出即可。