Skip to content
How do you clear text you print in python
Profile icon

How do you do that Pls help

You are viewing a single comment. View All
Profile icon

You can use a system command to clear the console, which can be executed using the os module. To clear the console, you use "clear" on Linux (which is used on Replit):

from os import system system("clear") #clears the screen

Or "cls" on Windows:

from os import system system("cls") #clears the screen