This question is specific to Google Colaboratory, while some solutions may work in a normal Python interperter, Google Colaboratory does not seem to allow me to programatically clear the Python interpreter output.
Solutions that I have already tried that do not work:
import os
os.system('cls')
os.system('clear')
!cls
!clear
from IPython.display import clear_output clear_output()
This is useful to me.
This snippet will halt the current Python runtime and reconnect to a fresh one. (Your filesystem will remain intact.)