open command console vscode code example
Example: clear output alternative for visual studio code in python
For Windows
>>> import os
>>> clear = lambda: os.system('cls')
>>> clear()
For Linux the lambda becomes
>>> clear = lambda: os.system('clear')