0

How can I clear/clean entire terminal screen/window of Python 3?

My aim is to:

  1. Print 5 lines in terminal/output screen window in Python3
  2. Clean the entire output screen
  3. Print 3 lines in the screen
Donald Duck
  • 8,409
  • 22
  • 75
  • 99

1 Answers1

1
import os
os.system('cls') # on windows

or

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

You can use these two for the clear screen in python 3

Patrick Haugh
  • 59,226
  • 13
  • 88
  • 96
Rahul shukla
  • 378
  • 1
  • 12