Ok so from my understanding you have to require something else, but why? Not to long ago you only had to import clear from replit and it would work and I have no idea why they would change it I guess I have to go back and define a clear function with os now
from replit import clear should still work in Python. If you want to do it in another language (or don't want to import anything), just print
\033[H\033[2J. This will move the cursor to the beginning of the terminal and delete all the text on it.