Clear Screen in Python | How to Clear Terminal/Console in Python

preview_player
Показать описание
⬇️ *LEARN ON THE BEST LEARNING PLATFORMS (LINKS BELOW)* 😉💪 ⬇️

*SKILLSHARE*
_(Python, Web Dev, UI/UX Design, Music, Art, Animation and a lot more)_

*DATACAMP*
_(Python, ChatGPT, SQL, Power BI, and a lot more)_

*COURSERA PYTHON*
_(For beginners, Data Science, Data Analysis, AI, Cybersecurity and a lot more):_

*COURSERA WEB DEVELOPMENT*
_(Full Stack, Front-End, Back-End, Web Design and a lot more):_

Learn how to clear the screen (terminal or console) with the right command by detecting automatically which operating system the user is using.
Instead of just overwriting the previous line we clear the whole terminal so that you can show a completely different thing to the user.

If the video was helpful, let me know in the comments down below and also like the video so that other people can see it. Needles to say I really appreciate your support 💪❤️

📨 SUBSCRIBE so that you don't miss any new video:

🔗 RELATED CONTENT (videos, playlists, etc) 🔗

🤩 AFFILIATE LINKS 🤩

🧑🏻‍💻 ABOUT ME 🧑🏻‍💻

I'm Fabio, I started programming with Python a lot of years ago and I fell in love with this world.
I started this Youtube channel to help you during your own journey and I hope that my help can make you an amazing programmer who loves this world as I do.
Welcome on board!! 🚀

#pythonWithFabioMusanni #python #pythonforbeginners #pythontutorial #pythonprogramming #coding #programming
Рекомендации по теме
Комментарии
Автор

⬇️ *LEARN ON THE BEST LEARNING PLATFORMS (LINKS BELOW)* 😉💪 ⬇️

*SKILLSHARE*
_(Python, Web Dev, UI/UX Design, Music, Art, Animation and a lot more)_

*DATACAMP*
_(Python, ChatGPT, SQL, Power BI, and a lot more)_

*COURSERA PYTHON*
_(For beginners, Data Science, Data Analysis, AI, Cybersecurity and a lot more):_

*COURSERA WEB DEVELOPMENT*
_(Full Stack, Front-End, Back-End, Web Design and a lot more):_

Thank you for the support!❤

FabioMusanni
Автор

If you're wondering how he added a # to all the lines, he use (Ctrl + /) after highlighting the desired lines.

osamahalghamdi
Автор

Exactly what I what looking for, Thanks!

dawn
Автор

Is there any way I can undo and go get back my screen. I have used this while I created a menu within a menu. So the main menu asks the user to select 4 options when the user select one option, he gets clear screen and then moves on to one of those 4 options. But what if the user wants to undo, and go back to the main menu to again select one of those 4 options. I tried using subprocess thing in a function then giving if user input is q, I call my main menu or else if user enters he gets clear screen. But when user inputs q he is gonna press enter so anyways screen will be cleared. What if I want to undo it?

misba
Автор

I still cant seem to find the "Emulate terminal in output console" in the popup.

zeeroslo
Автор

Is there no command like 'clrscr() in C'

technicalgyaan
Автор

Thanks for the video.
Really helped me out with my project.

MouseGoat
Автор

that is not working for me even with writing cls instead of clear. help me please

jihadnawzad
Автор

TIL you can do this much easier.

import os
os.system("cls||clear")

That's it. Two lines.

Magnymbus
Автор

Can I run this clear command using the widgets button? Thanks!

sirazulhaque
Автор

It doesn't work for me in pycharm :<

youngneji
Автор

operating_system = sys.platform
NameError: name 'sys' is not defined

PhillyWebRadio