Hello World in Python

Hello World in Python Featured Image

Welcome to the 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. Let’s dive in!

Table of Contents

Python Background

In order to learn more about Python, I took to Wikipedia for some background.

According to Wikipedia, Python is an interpreted general-purposed language that was created by Guido van Rossum, a Dutch programmer, in 1991. Apparently, Python was inspired by ABC, an imperative general-purpose language.

Since 1991, Python has had two major upgrades: Python 2.0 and Python 3.0. In October 2000, Python 2.0 was released. Over eight years later, Python 3.0 was released. Currently, the community supports both versions of Python. But, Python 2 is slowly losing support.

Hello World in Python

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

Sample Programs in Every Language

As you can probably tell be the heading, the plan for this series is to implement Hello World in as many languages as possible .

So far, my rough plan is to start with the general-purpose industrial languages: C/C++, C#, Python, and Java. Then, we’ll likely dive into more web-based languages like Ruby and PHP. After that, we’ll probably start exploring fringe languages like x86, COBOL, and Fortran. Finally, we’ll dive into the esoteric languages like LOLCODE and everyone’s favorite, Brainf*ck.

Next, we’ll take a look at how to implement Hello World in Java. Stay tuned!

Sample Programs in Every Language

Hello World in Every Language Hello World in Java

Jeremy Grifski

Jeremy grew up in a small town where he enjoyed playing soccer and video games, practicing taekwondo, and trading Pokémon cards. Once out of the nest, he pursued a Bachelors in Computer Engineering with a minor in Game Design. After college, he spent about two years writing software for a major engineering company. Then, he earned a master's in Computer Science and Engineering. Most recently, he earned a PhD in Engineering Education and now works as a Lecturer. In his spare time, Jeremy enjoys spending time with his wife and kid, playing Overwatch 2, Lethal Company, and Baldur's Gate 3, reading manga, watching Penguins hockey, and traveling the world.

Recent Posts