Hello World in Python

Published on 31 December 2018 (Updated: 31 December 2018)

Hello World in Python

Welcome to this originally first edition of the Hello World in Every Language series where I plan to embark on a journey of coding language exploration. First up, how to implement Hello World in Python.

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.1

How to Run 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. 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 and hit run.1


References

https://therenegadecoder.com/code/hello-world-in-python/. [Accessed: 31-Dec-2018].

  1. J. Grifski, “Hello World in Python,” The Renegade Coder, 15-Mar-2018. [Online]. Available:  2