I'm not sure if this is a dumb question or not, but I can't really find any information regarding it. I would like to know if and how to remove previous print statements from the program as it is running. This is kind of hard to explain! Here is some example code:
while True:
x = input('Where would you like to go? ')
if x == 'home':
print('You are at home.')
elif x == 'field':
print('You are at the field.')
elif x == 'exit':
break
And this code isn't really important. Just an example. When the code runs we get the question: 'Where would you like to go?' And we reply, 'home'. Then the print statement prints 'You are at home.' and the loop iterates again with the original question: 'Where would you like to go?'.
All that text is now in the window it runs in and as I keep doing things with the program, it builds up and I have a ton of text above where I am typing at the bottom of the window.
Is there a way to have this program run the question, me input say, 'home', and for it to run the code then remove itself so that the entire time the program is running I am typing my inputs at the top of the screen without the clutter of all the previous inputs and outputs? If this question can be asked a better way I can edit this.