Learn · Run · Break · Fix
A learning series from A Wandering Mind
Eighteen interlinked lessons on strings, lists, files, exceptions, and dictionaries—with original explanations, runnable examples, real output, and supporting CPSC 1301K lectures.
>>> guide = { ... "lessons": 18, ... "modules": 5, ... "python": "3.10+" ... } >>> guide["goal"] = "understand it"
Computer Science · Python 3.10+
Learn Python through small ideas that build on each other.
This beginner-to-intermediate guide teaches strings, lists, file input and output, exception handling, and dictionaries through original explanations, runnable code, real output, common mistakes, and short practice exercises. Selected CPSC 1301K lectures by Hyrum Carroll are included as supporting classroom references—not as a substitute for the written lessons.
Start here
The first lesson makes output easier to read.
Python becomes much more useful once programs can turn values into readable text. The opening lesson starts with formatted strings and f-strings, then the course moves into splitting, joining, and eventually data structures that can hold much more information.
Formatting Strings and f-strings
Learn how to place variables and expressions directly inside strings, control how values are displayed, and avoid the quoting and conversion mistakes that often trip up newer Python programmers.
Begin with formatted strings →language = "Python"
lessons = 18
print(f"{language}: {lessons} lessons")
# Output:
# Python: 18 lessons
A tiny preview. Each lesson explains the idea before asking you to use it.
Course map
Five modules, one continuous learning path.
The sequence is designed so later lessons reuse ideas introduced earlier. You can jump around when you already know the prerequisites, but first-time learners will get the most from following the modules in order.
Strings
Format text, split it into pieces, and join pieces back together.
Lists
Create, inspect, change, slice, copy, combine, loop through, and nest ordered collections.
Files
Open, read, write, and safely close files using modern context-manager patterns.
Errors
Use defensive checks and exception handling without hiding real programming mistakes.
Dictionaries
Store values by key, copy mappings safely, and choose between lists and dictionaries.
Complete outline
All 18 Python lessons.
Every lesson includes original written instruction, at least three runnable examples with real output, a Common mistakes section using authentic Python errors, practice exercises, and one or two supporting videos from the CPSC 1301K lecture series.
How this guide works
Read it, run it, break it, fix it.
Programming sticks when you can predict what code will do, see what actually happens, and understand the difference. Each page is designed around that loop rather than around passive watching.
Original written lessons
The explanations and examples in this guide are written independently by A Wandering Mind. The pages are intended to remain useful even if every embedded video disappears.
Code with real output
Examples are written for Python 3.10+ and executed before publication. When a lesson demonstrates a mistake, the traceback shown is generated by an actual failing example.
Practice without spoilers
Each lesson ends with short exercises. Solutions stay collapsed until you choose to open them, so you can attempt the problem before comparing your approach.
Videos as supporting references
Selected lectures from Hyrum Carroll's CPSC 1301K series are embedded with YouTube's privacy-enhanced player. They provide a second classroom explanation after the written material.
Keep learning
Python here. Practice tools across the Kestrel network.
A Wandering Mind is building this course as a readable programming guide. Kestrel Exams focuses on practice and study tools, so the two projects can support different parts of the same learning process.
Working on Java too?
Kestrel Exams already has Java-focused study resources. They are separate from this Python course, but useful if your computer-science classes move between both languages.
More Python practice
A dedicated Kestrel Exams Python study guide is being developed separately from these lessons. The link is intentionally low-key while that project takes shape.
Future Kestrel Python guide ↗