Learning to program feels mysterious until you write your first working line of code. Python is the friendliest language to start with because its syntax reads almost like plain English. Let us get you running real code in the next few minutes.
Getting Python on your machine Download the latest version from the official Python website and run the installer. On Windows, check the box that says add Python to PATH, which lets you run it from anywhere. On a Mac, the installer handles this for you. To confirm it worked, open a terminal and type python --version. Seeing a version number means you are ready.
Writing your first program Open a plain text editor or a free tool like VS Code, and type this single line:
- print("Hello, world!")
Save the file as hello.py, then run it from your terminal with python hello.py. The words appear on screen. You just told the computer to do something and it obeyed. That is all programming is at its core.