system('cls')
在使用 Dev-C++ 之前,我总是使用C 语言。现在我正在学习 Python 并使用 Pycharm 2020.2.3。
我尝试使用os.system('cls')
. 这是我的程序:
import os
print("clear screen")
n = int(input(""))
if n == 1:
os.system('cls')
我的程序没有错误,但它没有清除最近的输出。
这是我的程序的输出:
为什么它没有清除最近的输出似乎是什么问题?