For practice, I'm trying to do something in Python. I decided to make a simple hangman game - I am not creating a graphical interface. The game starts with a simple input (). Now, I would like the next line, in addition to the input request, to delete the hidden word. I tried using \ b (backspace character) but it does not work. Something like:
word = input("Your word: ") for i in range(len(word) + 12): print("\b")
Now printing the backlash symbol should remove the input and "Your word", but it does nothing. If I do this in IDLE, I get the squares and get nothing if I open it by clicking.
How to do it? I'm afraid I was not too clear with my question, but I hope you understand what I mean. :)
Bane bojanić
source share