How to write hello world in Python


Everyone gets started from this step. So here is a quick python tutorial, that teaches you how to set up your python environment and run a hello world application in python.

We are not doing too much in this tutorial. we will just print a string 'hello world' to the screen.

To run a hello world application. Make sure you have a Python environment set up. Check out this article if you do not know how to install python with a Full setup.

print hello world to the screen

Write Hello World in Python

Once you have python installed. Create a python file. Python file ends with .py extension.

Copy and paste the following code into your .py file.

# This is simple program to show how print statement works

print('Hello Python World')

Now open your terminal in the current directory and run the following command. If you or on windows, you will be using python or if you or on the mic, you will write python3 .

If you are on windows then run


If you or on Mic or Linux



output of the code

Summary and conclusion

In this article, you have seen how you can print a simple hello world string to the screen.

Post a Comment

* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !