简体   繁体   English

清零终端探头 python

[英]Clearing terminal probelm python

在此处输入图像描述

i was using the following code to clear my terminal:我正在使用以下代码清除我的终端:

import os
import sys
clear=lambda:os.system('cls')
clear()

but instead of clearing the terminal, it output a question mark.但不是清除终端,而是 output 一个问号。 Why?为什么? and how do i actually clear the terminal.以及我如何真正清除终端。 Using python 3.9使用 python 3.9

Try using cmd.尝试使用 cmd。 This command should only work for the normal terminal.该命令只适用于普通终端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM