We can use this script: def mytextfunction(x): print(x) return xinteractive_text = interactive(mytextfunction, x="Hello World")interactive_text It gives this display: