0
How do i clear my screen in Python Shell?
I want my code to run my code like from a clear screen in shell... clearing whatever was already there. Just like there if is clrscr() in c++ i think.
10 Answers
+ 2
If there is, idk, I use Python Idle u.u
Try writing some of these:
clr
cls
clear
+ 1
You can print "\n" * 30
+ 1
i use idle as well.
Actually i tried that before that u just said.. to print'\n' but it takes the cursor and the end of the page. What i wanted is to print at the top of clear screen.
+ 1
os.system('cls') should do the trick on Windows
+ 1
print('\33[2J\33[f',end='')
print('Hello world!')
# '\33[2J' could be enough, but depending of user console, not always put cursor at 0,0 (screen origin), what does '\33[f'
# google search for 'ansi escape codes' for more information ;)
0
ain't there any command?.. like there's in any other language
0
How to Clear Screen in Python IDLE: Working Solution (https://b3steng.com/how-to-clear-screen-in-python-idle-working-solution/)
An article has just been released to answer this question. Very simple and working solution. Follow the link above.
0
How to Clear Screen in Python IDLE: Working Solution (https://b3steng.com/how-to-clear-screen-in-python-idle-working-solution/)
An article has just been released to answer this question. Very simple and working solution. Follow the link above.
0
How to Clear Screen in Python IDLE: Working Solution (https://b3steng.com/how-to-clear-screen-in-python-idle-working-solution/)
An article has just been released to answer this question. Very simple and working solution. Follow the link above.
0
Just close and start python idle again. It works fine for me