Python 'Hello World!' Program

In this tutorial, you will write your first 'Hello World' program in Python.

The 'Hello, World!' program is a simple program that prints 'Hello, World!' on the screen. Since it's a very simple program, the 'Hello, World!' program is often used to introduce a new programming language to beginners.

Let's see how the 'Hello, World!' program works in Python.


Python 'Hello World' Program

To run any Python program, you either need Python locally installed on your computer or an online compiler.

To install Python locally, visit Getting Started With Python.

For now, you can use Programiz's Python Online Editor.

Now, let's write our first Python program.

# Program to print 'Hello, World!'
print('Hello, world!')

Output

Hello, World!

In the above program, we used the print() function to print the 'Hello, World!' message.

The print() function prints whatever object is inside the parentheses ().

Unlike other programming languages, you do not have to call the main function to run a Python program.


Things To Take Away

Here are the major takeaways from this program:

  • Python is easy to code.
  • Python simplifies the syntax, which helps programmers to focus on programming logic.
Did you find this article helpful?