Python for Beginners
Welcome
You have never written a program, and every course, job posting and tutorial seems to assume you have. This course starts at the blank file. You will install Python, type your first line, and build up, chapter by chapter, to a script that reads your files, remembers its data, talks to the internet, survives its own mistakes and comes with tests that prove it works.
About This Course
Python is the language this catalogue keeps pointing at. Machine learning is built on it, many backend services are written in it, and it is the tool people reach for when a task on a computer is dull enough to automate. This course teaches it from zero, to the point where you can write a useful program of a couple of hundred lines, maintain it, and read other people's Python without flinching.
It is a hands-on book. Every idea is explained in plain words first, and every program in it is one you type and run yourself. You will see a great many error messages along the way, on purpose, because learning to read them calmly is most of what separates a stuck beginner from a working programmer.
Who This Is For
Anyone who has never programmed and wants to start properly: career-switchers, students, analysts who are tired of doing the same spreadsheet by hand, testers and support engineers who keep meeting scripts, and readers of this catalogue's beginner books who reached the words "Python first" and wondered where to begin. If you can install an app and find a file in a folder, you have the background this course needs.
It is not a course about any one field. It does not teach web frameworks, databases or data-science libraries; those are the next books, and the last chapter points to them. It teaches the language itself, well enough that the next book reads easily.
What You Should Already Know
- How to use a computer, a browser and everyday apps, at an ordinary user's level
- How to find, create and rename files and folders in your file manager
- No programming, and no command-line experience: the terminal is introduced from zero in Chapter 1
- Arithmetic you already use for shopping and bills; no mathematics beyond that
How the Course Is Built
Twelve chapters in six movements. First contact (Chapters 1 and 2): what a program is, the terminal, installing Python, values and names. Control (Chapters 3 to 5): making decisions, repeating work with loops, and naming pieces of work as functions. Data (Chapters 6 and 7): dictionaries and their relatives, and reading and writing files. Failing well, and structure (Chapters 8 and 9): handling errors, splitting a program into modules, the standard library, and installing packages. The outside world (Chapter 10): saving data as JSON, requesting information from the internet, settings, and command-line arguments. Growing up (Chapters 11 and 12): classes, automated tests, the tools professionals use, and where to go next.
Every topic has the same shape: the problem it solves, the idea built step by step with code you can run, the mistakes people really make, why it matters, and a short knowledge check. Where a real example helps, it is a familiar one: your own spending, a bank statement, a trip abroad. Everything else uses the smallest example that makes the point.
Chapter Map
Disclaimer
This course is an independent educational project created and maintained by Sergey Okinchuk. It is provided for learning and reference purposes only.
No affiliation. This course is not affiliated with, sponsored by, endorsed by, or officially connected to the Python Software Foundation or any other company, product, or organization. "Python" is a registered trademark of the Python Software Foundation.
Trademarks. Product and company names referenced are the property of their respective owners. Use of any name is for identification and educational purposes only and does not imply endorsement.
Educational simplifications. This material teaches durable concepts for understanding. Explanations are deliberately simplified for learning; where a simplification could mislead, the text flags it. This course is not professional, legal, or financial advice, and its spending examples are examples, not budgeting advice.
Accuracy and currency. Tools, installers and services change over time. Facts reflect the author's understanding at the time of writing, against Python 3.15. Always consult the official documentation at python.org for the current state of any tool.
No warranty. This material is provided "as is" without warranty of any kind. The author accepts no liability for any loss or damage arising from reliance on the content.