Python – Hello World

Hello World Program

Hello World is a classic program that majority of the learners of any programming language start with. It is to print a message Hello World! to the output.

Python - Hello World

In the following program, we print the message ‘Hello World!’ to the console output, using print statement.

Python Program

print('Hello World!')
Run Code Copy

As simple as that, we get the message printed to the console output.

Click on the Run button below the program, to run the Python code online in a new tab.

We can have the above code in a Python file, say main.py, and run as shown in the following using python command.

Python - Hello World - Terminal Output

Or, run the code (print statement) as is in a Python terminal as shown in the following.

Python - Hello World - Shell Output

Related Tutorials

Code copied to clipboard successfully 👍