コンソールで
この例では、"This line is cleared." を出力して、clear_output()で消します。>> from IPython.display import clear_output
>> print("This line is cleared.")
>> clear_output()
Jupyterで
以下のコードでは『Jupyterの表示を消す』→『Hello World!を出力』 →『1秒待つ』という処理を繰り返しています。from IPython.display import clear_output参考stackoverflow
import time
for i in range(10):
clear_output()
print("Hello World!")
time.sleep(1)
0 件のコメント:
コメントを投稿