How To See What I Print In Python Using Terminal? I am a beginner
What did you try? When you do not do something special, all
print() output will appear on the terminal.
(venv) mennoh@vecht12-2:~/python/debtors> python -c “print(‘Wow, so easy’)”
Wow, so easy
In the repl it will appear under your input; there “something special” is done.
(venv) mennoh@vecht12-2:~/python/debtors> python
Python 3.6.12 (default, Dec 02 2020, 09:44:23) [GCC] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
print(“Wow, so easy”)
Wow, so easy
I don’t understand your question:
“How To See What I Print In Python Using Terminal?”
Perhaps I don’t understand what you mean, but can’t you just look at
what is printed?
>>> s = "Hello World" >>> print(s) Hello World
If you have another problem, can you explain what the problem is please?
Oh, I think I know what you might mean!
If you run a Python script in Windows, when the script finishes the
console window automatically closes instantly.
I am not a Windows user, so I don’t know if there is a better way to
solve that problem, but you could try adding this at the end of your
s = input("Press the enter key to exit")
That will pause and wait for you to press the enter key, which should
give you plenty of time to read the printed output of your script.
Does that help?