Skip to content
Sign upLog in

How do I make my text in Python disappear when the user presses a key?

Profile icon
9751

How do I make my text in Python disappear when the user presses a key?

You are viewing a single comment. View All
Profile icon
Bookie0

you can do this:

import os input() #makes the user press enter os.system('clear') #clears the screen (makes all the text on console disappear)

you can also make os.system('clear') into a function for easier coding:

def clear(): os.system('clear')

hope this helps! =)

Profile icon
CoolJames1610

UH COPYCAT xD

@Bookie0

Profile icon
Bookie0

how? theres only that i think, and I always put it into a function so that its easier. Plus, i added comments XD

@CoolJames1610

Profile icon
CoolJames1610

smh xD copycat :P

@Bookie0

Profile icon
CoolJames1610

i also put it in a function

@Bookie0

Profile icon
Bookie0

smh uneccessary pinging

@CoolJames1610

Profile icon
CoolJames1610

smh smh

@Bookie0

Profile icon
CoolJames1610

btw pls check my new project you dont have to

@Bookie0

Profile icon
Bookie0

which one (also you should stop pinging, especially for the person who posted this ask)


@CoolJames1610

Profile icon
CoolJames1610

oh wow.

@Bookie0

Profile icon
Bookie0