Hello World in PythonPublished on 31 December 2018 (Updated: 02 May 2020)
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:
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 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:
Alternatively, we can copy the solution into an online Python interpreter and hit run.
- Hello World in Python on The Renegade Coder