我想定期清除 Google Colab 中单元格的输出,该单元格运行带有 !python file.py
的本地 python 文件
我已经在 stackoverflow 上尝试过这个问题的答案:from google.colab import output
output.clear()
和from IPython.display import clear_output
clear_output()
如果我直接在单元格中而不是通过本地文件运行它们,那么这两种方法都可以工作。
最佳答案
from IPython.display import clear_output
clear_output()
关于python - 如何通过代码清除 Google Colab 中的输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60127913/