Hello World in Elm

Our first program will print the classic “hello world” message. Here’s the full source code.

print("hello world")

To run the program, save the code in a file called hello-world.py and use the python command to execute it.

$ python hello-world.py
hello world

Sometimes we’ll want to build our programs into executables. One way to do this in Python is by using a tool like PyInstaller.

First, you need to install PyInstaller:

$ pip install pyinstaller

Then, you can create an executable from your Python script:

$ pyinstaller --onefile hello-world.py
$ ls dist
hello-world

We can then execute the built binary directly.

$ ./dist/hello-world
hello world

Now that we can run and build basic Python programs, let’s learn more about the language.