1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Is there a way to only clear part of the screen in python? [duplicate]

Discussão em 'Python' iniciado por Stack, Setembro 14, 2024.

  1. Stack

    Stack Membro Participativo

    I'm new to coding and am using VS Code to learn Python. Is there a way to only clear a section or part of the screen? I know how to clear the whole screen, but I want to leave part of it alone.

    I want to have the program title and initial instructions printed at the top of the screen, with some user input instructions lower down. I want the user input instructions to change in response to the input, while leaving the top alone.

    Is there a way to do this, without a while loop constantly re-printing the whole screen each time? I've searched all over and can't seem to find a solution!

    I've tried:

    import os
    os.system('cls')


    but this clears the whole screen and I only want to clear part of it, say from line 5 onwards.

    Continue reading...

Compartilhe esta Página