When I’m executing a highlighted python code in VScode I see the output in terminal along with actual code. Is there a way to make the terminal display output only and not all lines of code associated with it?
CodePudding user response:
No, because it executes the selected code in interactive mode.
In order to get clean output you need to write your code to a .py file and execute it.
CodePudding user response:
You could creat a new .py file and put the code into this file.
For example, I have a .py file namde Helloworld.py
and one line in it.
Then you could run this file by click "Run python file"
Here is the terminal shows:
If the above does not work, I think there may be a problem with your default terminal settings.