Question : write cell output to file jupyter colab
Answered by : suman-michael
%%capture cap --no-stderr
print_something()
with open('/path/to/capture.txt') as f: f.write(cap.stdout)
Source : https://stackoverflow.com/questions/57568861/how-to-capture-everything-that-is-printed-in-a-jupyter-notebook-based-on-ipython | Last Update : Fri, 30 Jul 21