Skip to content
Home » Programming » Hello World Program in Python with Explanation

Hello World Program in Python with Explanation

Hello World Program in Python

In this post, we will be investigating Hello World Program in Python. In this program, we will print “Hello World!” and clarify the linguistic structure simply known as syntax of the program.

Program to print Hello World in Python

#print() displays the specified message in the screen
print("Hello World!")    

Note: In order to execute this program, save it with a suffix of .py, for example, HelloWorld.pyCtrl+F5(for Visual Studio Code IDE). According to different Integrated Development Environments (IDEs), the process to run the program may differ, no need to worry about it.


Hello World!


This is presumably the least complex Python program you’ll ever make, all things considered it’s as yet a Python program. Likewise with any PC program, you can spare this to a record, at that point add to greater usefulness later if necessary.

In the first line, we can see the sentence followed by hash ‘#‘, are known as comments.

    #print() displays the specified message in the screen

Comments can be taken as the important part of the programming as they allows the programmers to explain what each part of the code does. It is especially important when the program is a bit more than a line, but it’s good to practice writing comments as you write the program (even the program is small).

After the comment, we encountered the print() carrying the message “Hello World!” to be displayed on the screen as output.

print("Hello World!")

As comparing it with other programming languages like C, C++, C#, Java etc. we must end a statement with a semicolon (“;“). But in Python, there is no any compulsive string or symbol like semicolon (“;”) to end a statement.

There are bunches of IDEs for Python programming; IDLE, PyCharm, Spyder, PyDev, Wing IDE, Visual Studio Code, and many more. Among which, I personally use Visual Studio Code for Python Programming as it also has various extensions like HTML, CSS, etc.

Now, take this program and embellish it a bit.

Leave a Reply

Your email address will not be published. Required fields are marked *