Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to print something to console in Python?

I have tried to print something in the termianl, however it didn’t work so far.

My code:

console.log("Hello World")

However python gives me syntax error :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Traceback (most recent call last):
   File "<string>", line 1, in
<module>
NameError: name 'console' is not defined

Do I have to download console first to use it in python?

Thanks for advice.

>Solution :

print is most likely what you’re looking for:

https://www.w3schools.com/python/ref_func_print.asp

ex:

print("Hello world!")
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading