how to clear the screen in python [duplicate] how to clear the screen in python [duplicate] python python

how to clear the screen in python [duplicate]


If you mean the screen where you have that interpreter prompt >>> you can do CTRL+L on Bash shell can help. Windows does not have equivalent. You can do

import osos.system('cls')  # on windows

or

os.system('clear')  # on linux / os x