Ask coding questions

← Back to all posts
ModuleNotFoundError: No module named 'replit'
JoshD1 (0)

I googled the error i got and found people answering the question saying it couldnt be in project mode. I made a single file, and it still wont let me import replit. This is code that someone gave since it wasn't a project, and it still fails to work

Answered by Klokat (42) [earned 5 cycles]
View Answer
Klokat (42)

I'm not sure what's with import replit. But if you really need to clear the screen there's a non-portable solution by using

input("enter to clear")

"\x1B" is the character for the escape key [ is the Control Sequence Introducer and then 2J which clears the entire screen as you can see from the Wikipedia article. Again this is not a portable solution but if you really need a quick solution there you have it.