Напишите вывод ячейки для подачи Jupyter colab
%%capture cap --no-stderr
print_something()
with open('/path/to/capture.txt') as f:
f.write(cap.stdout)
Lazy Lizard
%%capture cap --no-stderr
print_something()
with open('/path/to/capture.txt') as f:
f.write(cap.stdout)