Open in CoCalc with one click!
y = '' @interact def f(x=''): global y if x: y = x f.x = '' print y + ' ' + y
Interact: please open in CoCalc