S
S
sepllexxa2021-10-08 22:13:09
PyCharm
sepllexxa, 2021-10-08 22:13:09

PyCharm not outputting result?

Even the simplest print('Hello world') operation seems to be ignored. As a result, only Process Finshed with exit code 0 is obtained, that is, the code was successfully executed, but there is no result. What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alan Gibizov, 2021-10-08
@phaggi

I assume you run the script with the green button at the top? And look next to the button to the left of it, what script is indicated? The one you are running? There's a dropdown list.
It is best to add the construction to the text of the script

if __name__ == "__main__":
   print("Hello python")

and a little green triangle will also appear to the left of this line. Run them, and you definitely can't go wrong.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question