Hi guys! I'm new to coding and have a question.
I'm new to this and I want to know how I can remove text shown on screen with new text after a certain amount of time.
Ask coding questions
I'm new to this and I want to know how I can remove text shown on screen with new text after a certain amount of time.
you can sleep, clear and re print
is this what you wanted?
@CodingCactus Could you show me how to do that?
@TomasFabbroni hrm no sorry, i don't do pygame
maybe use blit() or something, but i don't know sorry
@TomasFabbroni Do you want to clear the turtle console or the console with the text?
If you want to clear and re-print in the text console:
To sleep:
import time
orfrom time import sleep
.For the clear, you can use this that I use:
def clear(): os.system('cls' if os.name=='nt' else 'clear')
To use this, write
clear()
in your code to clear the console.Then to re-print,
print("Whatever you want to print")
If you want to clear the Turtle console:
Note: I am using Python with Turtle instead of importing Turtle.