Visual Studio 2019 Python code to clear terminal for next input

Berek 1 Reputation point
2021-12-09T07:50:17.587+00:00

This is my Python code:

next_bid = True

while next_bid == True:
ask = input("Is there another bid? yes or no?").lower()
if ask == "yes":
next_bid = True
else:
next_bid = False

What code do I enter and where to get the terminal to clear previous entry, so the next person cannot see previous entry, before next entry is made?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,923 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,341 Reputation points
    2021-12-09T14:04:28.48+00:00

    Hello @Berek

    I think that there is no need for extensions, just standard VS Code settings. Go to settings and type Terminal. You are looking for: Debug > Terminal: Clear Before Reusing. Tick the box and every time you will run your script, the terminal will clear itself from previous output.

    Hope this helps with your query!

    -------
    --If the reply is helpful, please Upvote and Accept as answer--