简体   繁体   English

让打印的线条在python中消失

[英]Let printed lines disapear in python

How can I tell my program to delete the previous text if Enter was pressed? 如果按下Enter键 ,如何告诉程序删除先前的文本?

print('Information: \n ' )
input('Press Enter to continue.')

So if the user read the Info and presses Enter the text above still remains. 因此,如果用户阅读了信息并按Enter,则上面的文本仍然保留。

How can I remove it? 如何删除?

Following script can clear your screen 以下脚本可以清除屏幕

import subprocess as sp
sp.call('cls',shell=True)

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

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