Hello World in Python

Published on (Updated: 02 May 2020)

Hello World in Python

Welcome to the Hello World in Python page! Here, you'll find the source code for this program as well as a description of how the program works.

Current Solution

print('Hello, World!')

Hello World in Python was written by:

If you see anything you'd like to change or update, please consider contributing.

How to Implement the Solution

I chose Python to start as it has probably the easiest and most readable Hello World implementation in the realm of programming languages:

print("Hello, World!")

And, we're done. In fact, we don't even have to compile anything. If we're in the interpreter, we'll print right away. Otherwise, we can easily call the script from the command line to get our result.

As you can probably imagine, this code works because Python has a built-in function called print. By passing that function a string, the interpreter is able to call the Python libraries that make the print possible.

How to Run the Solution

If we want to run this program, we should probably download a copy of Hello World in Python. After that, we should make sure we have the [latest Python interpreter][1]. From there, we can simply run the following command in the terminal:

python hello-world.py

Alternatively, we can copy the solution into an [online Python interpreter][2] and hit run.