How to clear the interpreter console?

后端 未结 30 2205
自闭症患者
自闭症患者 2020-11-21 18:15

Like most Python developers, I typically keep a console window open with the Python interpreter running to test commands, dir() stuff, help() stuff

30条回答
  •  孤街浪徒
    2020-11-21 18:42

    Just enter

    import os
    os.system('cls') # Windows
    os.system('clear') # Linux, Unix, Mac OS X
    

提交回复
热议问题