Title here
Summary here
Our first program will print the classic “hello world” message. Here’s the full source code.
# hello_world.py
print("hello world")To run the program, save the code into a file named hello_world.py and use the python command to execute it.
$ python hello_world.py
hello worldPython doesn’t require building programs into binaries like some other languages. However, if you want to package your Python script into a standalone executable, you can use a tool like PyInstaller.
First, install PyInstaller:
$ pip install pyinstallerThen, create the standalone executable:
$ pyinstaller --onefile hello_world.py
$ ls dist/
hello_worldWe can then execute the standalone executable directly.
$ ./dist/hello_world
hello worldNow that we can run and build basic Python programs, let’s learn more about the language.