How do you clear the console in Python?
I'm trying to clear the console every time the code is run, but I don't know how.
Nice basic option to answer this question, there is a handy module "os" that contains a function that will work:
system(). Here is the syntax you want:
from os import system clear = lambda: system("clear") # Now you can do it at any time by simply calling: clear()
Hope this helped!