from __future__ import print_function
from IPython.display import clear_output
for i in range(10):
clear_output()print(i)
9
print("Hello world")
clear_output()
print("Hello world", end='')
=True) # no output after this clear_output(wait
Hello world
print("Hello", end='')
=True) # here we have new output after wait=True
clear_output(waitprint("world", end='')
world
= display("Hello world", display_id="id0") handle0
'Hello world'
= display("Hello", display_id="id1") handle1
'world'
'world') handle1.update(
= display("Hello world", display_id="id2")
handle2 # clears all output, also with display_ids clear_output()
= display("Hello world", display_id="id3")
handle3 =True) clear_output(wait
'Hello world'
= display("Hello", display_id="id4")
handle4 =True)
clear_output(waitprint('world', end='')
world
'Hello world') # it is cleared, so it should not show up in the above cell handle4.update(