📜  如何清除控制台python代码示例

📅  最后修改于: 2022-03-11 14:45:50.050000             🧑  作者: Mango

代码示例4
As you mentioned, you can do a system call:

For Windows
>>> import os
>>> clear = lambda: os.system('cls')
>>> clear()

For Linux the lambda becomes
>>> clear = lambda: os.system('clear')