Chapter 1
What Python Actually Is
Before You Choose Python
Yes. For most people who are asking, learning Python is worth it.
I would rather earn that answer than ask you to take it. You will see where Python is a genuinely good choice, where it is a compromise, and where I would send you somewhere else entirely. Then the decision is yours to make.
Start with the thing Python is best known for.
Four numbers you would rather not add up
Here is a complete Python program, followed by what Python prints when it follows those instructions.
Four-month total: 4760
Worst month: 1430
Two things there are worth keeping apart. A person wrote the first part, the source code, to describe what should happen. Python read it and produced the second part, the output. They are not the same text. The punctuation that helps Python understand the instructions does not appear in the result.
Press Run if you would like to watch it happen. Nothing needs changing, and you are not expected to know yet how each line is written.
Four numbers is a slightly ridiculous thing to hand a computer. You would add them yourself. What makes it interesting is that those same four lines work unchanged on four thousand bills, and they are still correct on the four hundredth run at two in the morning.
That is automation: letting a computer do work that would otherwise be done by hand. A real automated report needs more than this. It has to find reliable data, cope with a missing month, and put the answer somewhere useful. The core idea is already here though, and it is a small one. Write the rule down once. Let the machine repeat it.
Where I reach for Python, and where I do not
Repetitive work with information is the first place I reach for Python. Copying figures out of four files every Friday. Renaming eight hundred photographs. Checking a folder of forms for the ones missing a date. Each of those has a rule you could explain to a colleague, which is what makes it explainable to a program, and Python arrives with ready-made tools for files, text, and data.
Call that a strong fit: Python is commonly a sensible first choice.
Now change the goal. You want a polished app for iPhone or Android, with screens, gestures, and notifications that feel native to the phone. Python can still be useful elsewhere in that product, but for the screens themselves it is usually not the first choice. Apple teaches Swift for its own apps. Google’s official Android lessons use Kotlin.
I would rather tell you that in the first lesson than the last one.
It also points at the question worth asking. “Can Python do this?” is nearly always yes, given enough effort, which is why it settles so little. The better question is whether Python makes the important part of your project easier to build, check, share, and look after a year from now. Sometimes that is a clear yes. Sometimes Python works but charges you for it. Sometimes another language hands you a better place to start.
Bring your own reason
You probably have one already. Perhaps you want to take a repeating task off your week, look at some data properly, build the part of a website nobody sees, understand how AI systems are actually trained, or read the code an AI produced for you well enough to argue with it.
None of that requires wanting a career in software. A researcher who cleans one stubborn dataset, and an office worker who deletes a recurring Friday task, both have an excellent reason to learn Python.
Keep your reason nearby. As we visit automation, websites, data, AI, phones, speed, and programming alongside AI, you can hold each one up against what you actually want.
One loose end before we go. I have been using “Python” as though it named a single thing. It does not. The language, the software that ran your program a moment ago, the tools that arrive with it, and the enormous collection of add-ons built by other people are four different things. Telling them apart explains a surprising amount about what Python is good at and where it struggles.
Go deeper
Python’s own General Python FAQ covers common background questions about the language, its name, and how it is developed. It is optional; everything this course needs is here.