首页 > 解决方案 > 如何获取所有准备好的打印内容的字符串

问题描述

我想在 python 中获取所有当前打印的东西的字符串,如下所示

print("hello world")
print("Hello")
currentlyPrintedThings = getCurrentlyPrintedThings()
print(currentlyPrintedThings")
"hello world"
"hello"

谢谢

标签: pythonprinting

解决方案


推荐阅读