jupyter notebook clear output python code example
Example 1: clear outpur jupyter
from IPython.display import clear_output
for i in range(10):
clear_output(wait=True)
print("Hello World!")
Example 2: jupyter notebook delete the output
jupyter nbconvert --clear-output --inplace my_notebook.ipynb