Getting Started with Python: Your First Steps Into Programming
So, you’ve decided to learn Python. Great choice! Python is one of the most beginner-friendly programming languages out there, with clean syntax, a huge community, and is applicable to many different industries such as web development, artificial intelligence, and data science.
Python was also the very first language I learned, back in an introductory programming course in college nearly a decade ago. The way it was taught through Python immediately clicked with me, the syntax felt natural enough that solving problems with programming was very approachable. That seems to be a common experience for beginners starting with Python: it just makes sense. This series is designed to provide the kind of guidance I wish I had when I first began programming.
In this guide, we’ll walk through everything you need to get started: installing Python, writing your first program, and understanding the basics of how Python works. By the end, you’ll have the foundation to start your programming journey.
Why Python?
Whenever I talk about Python, I can’t help but light up a little. As both an enthusiast and someone who loves educating, I see Python as the language that opens doors for people. It has this rare mix of power and simplicity that lets beginners feel confident quickly while still offering depth for advanced projects. It is something that I have found in very few languages, such as Ruby and Golang.
I love Python as someone’s first language for several reasons:
Readable syntax – Writing Python is almost like writing pseudo code, which means your focus stays on solving problems rather than fighting with the language.
Beginner-friendly – Because the syntax is so clean, beginners often get that “aha!” moment faster than with other languages.
Versatile – Whether you’re curious about web development, data analysis, automation, AI, game dev, or even hardware with IoT, Python has something for everyone.
Huge community – I’ve never had a question where I couldn’t eventually find an answer. The Python community is generous and filled with resources. Which, to be honest, is maybe not so important anymore with the rise of AI
Python isn’t the absolute best at every single niche, but that’s what makes it so practical, it’s good enough in nearly every situation which has lead to the language burying it’s claws in many different facets of programming. To me, that makes Python less of a specialty tool and more of a true workhorse. And that’s exactly why it has become my go-to recommendation for anyone getting started.
Step 1: Installing Python
I usually recommend learners install Python 3.9 or newer, since that ensures you’re working with up‑to‑date features while still being compatible with most tutorials and libraries. For this series, we’ll assume you’re using 3.9+, though in practice it’s best to download the most recent stable release unless you have a clear reason to stick with an older version.
Windows
First, check if Python is already installed on your system. Open the Command Prompt and type: Python.
If the Microsoft Store opens instead of showing a Python prompt, close it. In that case, you’ll want to download Python directly from the official website rather than relying on the Store version. Sometimes the Microsoft Store version is behind the curve with updates. However, if you feel inclined to download from the store be my guest.
Go to python.org/downloads.
Download the latest stable version (e.g., Python 3.12).
Run the installer, and make sure to check “Add Python to PATH” before clicking install. This step is crucial because it allows you to run Python from the Command Prompt without extra configuration.
macOS
Modern versions of macOS no longer ship with Python preinstalled. If you are on macOS Catalina (10.15) or newer, you will not have Python out of the box. On older versions of macOS, you may find Python 2.7 installed by default, but this version is deprecated and not suitable for this tutorial series.
To continue, you will need Python 3. The easiest way is to install Homebrew and run: brew install python
Linux (Ubuntu/Debian)
This one is very easy. Python is usually preinstalled. To check:
python3 –version
If not installed:
sudo apt update && sudo apt install python3
Step 2: Writing Your First Python Program
Let’s start small. Open your terminal (or command prompt) and type: python
This launches the Python REPL (Read–Eval–Print Loop), an interactive mode where you can try out Python commands. The REPL is incredibly useful for beginners because it lets you experiment line by line without the overhead of creating files, making it easier to learn through quick feedback.
Type:
print(”Hello, world!”)
Your REPL should return back the phrase “Hello, world!” right there in front of your eyes. Congratulations, you just wrote your first Python program! Wasn’t that easy? Of course, programs get a lot more complicated than just printing one sentence to the screen, but don’t worry about that for now.
Before we move on, let’s actually break down what we wrote here. When you type print(”Hello, world!”)
, Python sees the word print
and recognizes it as a built-in function. A function is a sectioned off block of code that has a specific purpose or task. It is a way to modularize your program and reuse code multiple times without having to retype it out over and over again.
Most programming languages come with built-in ready to use functions that serve common functionality of the language’s use case. The parentheses are how we pass data to that function, and inside them we’ve placed a string of text surrounded by quotes: “Hello, world!”
. When the interpreter runs the line, it calls the print
function with that string as an argument, and the function’s job is to display it back to the user.
Step 3: Running Python Scripts
Instead of typing everything in the REPL, you’ll typically write Python in a script file. Scripts have the benefit of being saved and reused, so you can build on your work over time instead of retyping commands. They also make it easier to organize larger programs, share code with others, and use version control systems like Git.
For beginners, this means you can gradually grow a project instead of starting from scratch each session.
Open a text editor (I recommend VS Code or PyCharm, but any text editor will work).
Save a new file as
hello.py
.Add this code:
print(”Hello from my first Python script!”)
Run it from the terminal: python hello.py
Note: If you run into an error after typing python hello.py
, it usually means your system is set up to use python3
instead of python
. This happens because some computers still keep an older version of Python under the python
command. If that’s the case, just type python3 hello.py
instead, and it should work the same way.
Step 4: Where to Go Next
Now that you’ve learned how to run code in both the REPL and in scripts, you’re ready to branch out. In upcoming tutorials, we’ll cover topics such as:
Variables & Syntax: how to store information in your programs and follow Python’s rules for writing clean, correct code
Control flow: making decisions with
if
statements and repeating actions with loops.Functions: creating reusable blocks of code to keep programs organized.
Modules & packages: tapping into Python’s massive ecosystem of pre‑built tools and libraries.
Each of these concepts will help you write more powerful, flexible programs. Don’t worry — we’ll take them one step at a time.
Conclusion
Python is one of the best first languages you can learn because its simplicity makes programming feel approachable while still being applicable/relevant in nearly every facet of programming. In this tutorial, you’ve taken some important first steps: you installed Python, learned how to run it interactively in the REPL, and discovered how to save and execute your very first script.
Being comfortable with these basics means you can now focus on learning the core building blocks of programming because after all if you can’t run the program then what use is it to you. In the next lesson, we’ll dive into variables and data types, the tools that let you store, organize, and work with information in your programs. Mastering them is your next step in the programming journey.