Skip to content
← Back to Community
How to erase...
Profile icon
ArmedWithStew

How do we erase the printed stuff? For example,
print('Hello world')
erase('all')

How do we erase?

Answered by Highwayman [earned 5 cycles]
View Answer
Voters
Profile icon
SynaGupta
Profile icon
ArmedWithStew
Comments
hotnewtop
Profile icon
Highwayman

Python (only repl.it):

import replit print("Hello World") replit.clear()

C/C++ (Linux)

#include <ncurses.h> int main(){ WINDOW * wnd = initscr(); printw("Hello World"); refresh(); clear(); }

General solution (the crappy way, pseudocode):

var i = 0; while i < 1000 : inc i; print('\n');
Profile icon
Highwayman

What language?