问题
I have a notebook that is going to print off hundreds of lines. Is there anyway to have the next line print above the last one?
As in:
Output_n
...
Output 2
Output 1
Instead of:
Output1
Output2
...
Output_n
回答1:
Kind of! from IPython.display import clear_output
, then calling clear_output()
will clear everything. Then you reprint everything starting from Output_n. It's... not ideal.
Here's a link.
来源:https://stackoverflow.com/questions/24439629/ipython-notebook-print-above-last-line