replit import clear
Back then, from replit import clear worked. Now it doesn't. What happened?
[deleted]
- Add the replit package
- import clear function from replit module
- Use it!
An example:
from replit import clear for _ in range(100): print("x" * 20) _clear = input("Clear terminal? Y or N: ") if _clear in ["y", "Y"]: clear()
ArjunSS1
@malvoliothegood that is good code but you can just do clear.lower() == 'y':
[deleted]
@ArjunSS1 Yes, yes!
For some reason the replit module isn't preinstalled anymore, so you have to add the replit module using the package section at the sidebar before importing.