Title here
Summary here
Our first program will print the classic “hello world” message. Here’s the full source code.
if __name__ == "__main__":
print("hello world")To run the program, save the code in a file named hello_world.py and use the python command.
$ python hello_world.py
hello worldSometimes we’ll want to create an executable for our Python programs. We can do this using tools like pyinstaller.
First, install pyinstaller if you haven’t already:
$ pip install pyinstallerThen create an executable:
$ pyinstaller --onefile hello_world.py
$ ls dist/
hello_worldWe can then execute the built binary directly.
$ ./dist/hello_world
hello worldNow that we can run and build basic Python programs, let’s learn more about the language.