Chapter 147·Beginner·8 min read
What Python Is (and Your First Program)
A plain-English introduction to Python — what it is, why it became the world's most popular first language, how the interpreter runs your code line by line, and how to write and run your very first program. The starting line for the whole guide.
July 27, 2026
Welcome to Python — quite possibly the friendliest doorway into programming that exists, and the language behind an enormous share of the world's data science, automation, web backends, and artificial intelligence. If you've never written a line of code, this is a wonderful place to start. If you've programmed before, you'll find Python refreshingly direct. This guide builds up the fundamentals one idea at a time, and this first chapter answers the most basic questions of all: what is Python, why does everyone use it, and how do you get it to actually do something?
What a programming language really is
A computer, underneath, only follows instructions. A programming language is how you write those instructions in a form a human can read and a computer can act on. Python is one such language — and it's designed, above almost everything else, to be readable. Its creator's guiding principle was that code is read far more often than it's written, so the language should stay clean and close to plain English.
Compare a line of Python to the sentence it expresses:
if temperature > 30:
print("It's hot today")You can almost read that aloud: "if the temperature is greater than 30, print 'It's hot today'." That closeness to natural language is Python's superpower. It lowers the barrier to entry so much that Python has become the default first language taught in schools and universities, and the standard tool in fields — data analysis, machine learning, scientific computing — where the people writing code are experts in something other than programming.
Interpreted: write, run, see
Here's a defining trait worth understanding early, because it shapes how learning Python feels. Python is an interpreted language. That means there's a program — the Python interpreter — that reads your code and executes it line by line, top to bottom, right away. You write instructions in a file, hand the file to the interpreter, and it immediately does what the lines say.
This is different from compiled languages (like C or Rust), where a separate "build" step first translates your entire program into machine code before it can run. With Python, there's no waiting on a build — you change a line, run it, and see the result instantly. That tight write-run-see loop is a huge part of why Python is so approachable: experiments are cheap, feedback is fast, and mistakes are easy to try again.
Your first program
Enough theory — let's make the computer speak. The single most important tool for a beginner is the print() function, which displays text on the screen. Here is a complete, real Python program:
print("Hello, Python")Run it, and the interpreter prints:
Hello, PythonThat's it — a whole program in one line. The pieces: print is a built-in function (a named action Python already knows), the parentheses () say "do this action," and the text inside quotes — "Hello, Python" — is the string of characters you want shown. Change the words between the quotes and Python will happily say anything you like.
print() will be your constant companion. Beyond saying hello, it's how you look inside your programs — printing a value to check what it holds is the beginner's most reliable debugging tool, and honestly a lot of professionals' too.
print("Learning Python")
print(2 + 2)
print("The answer is", 42)This runs three lines, in order, producing three lines of output — including 4, because Python evaluated the maths, and a line where print joined two values with a space. Notice you can print numbers and text, and that Python does the arithmetic for you.
The one rule that trips up newcomers: indentation
There's one piece of Python grammar so distinctive it deserves a spotlight now, because it surprises nearly everyone: Python uses indentation — the spaces at the start of a line — as part of the language itself. In most languages, indentation is just tidiness. In Python, it's meaning. The spaces are how Python knows which lines are grouped together.
Look again at the earlier example:
if temperature > 30:
print("It's hot today")The indented print line is "inside" the if. That indentation is what tells Python the print belongs to the condition. Get it wrong — indent inconsistently, or forget to — and Python stops with an IndentationError. It feels strict at first, but it has a lovely side effect: all Python code is forced to be neatly formatted, so Python written by anyone tends to look consistent and readable. We'll lean on this constantly once we reach conditionals and loops.
Where this leaves us
You now know what Python is and how it thinks: a readable, interpreted language that runs your instructions line by line, top to bottom, with indentation as part of its grammar — and you've written a real program that puts text on screen. That may feel small, but you've crossed the biggest gap there is: from reading about code to running it.
From here we start filling the toolbox. The very next thing every program needs is a way to remember information — a name to hold a number, a piece of text, a yes/no answer — so it can use it later. That's the job of variables, and the different kinds of values they can hold: Variables and Data Types.