Python Functions Explained
Defining functions, parameters and defaults, keyword arguments, return values, scope, docstrings and when to split code into functions.
Try: python lists, javascript functions, syntax error, first project
Every guide on the site, newest first. Explanations, projects and fixes written in plain English.
Defining functions, parameters and defaults, keyword arguments, return values, scope, docstrings and when to split code into functions.
Dictionaries store labelled values. Here is how to create, read, update and loop over them, plus how to avoid the KeyError that…
Creating lists, indexing, slicing, adding and removing items, sorting, and the copy trap that catches every Python beginner at least once.
How for loops work in Python: looping over lists, using range, enumerate and zip, break and continue, and building a list from…
How conditions work in Python: comparison operators, elif chains, and, or, not, truthiness, and why indentation decides what runs.
Strings, integers, floats, booleans, lists, dictionaries and None — what each is for, how to convert between them, and how to check…
How variables work in Python: creating them, naming rules, multiple assignment, and the mutable-versus-immutable behaviour that surprises beginners.
Write, save and run your first Python program, then extend it. Every line explained, plus the three errors beginners hit in the…
Step-by-step Python installation for Windows, macOS and Linux, plus how to confirm it worked and fix the "python is not recognised" error.
Everything you need to begin with Python: what it is good at, how to install it, your first program, the core syntax,…
Why are there so many programming languages, and does the choice matter? A plain-English look at what languages have in common, how…
An algorithm is just a clear set of steps for getting something done. Here is what that means in code, why some…
The fastest way to improve is to read one guide, then build the thing it describes. Start with the basics, or jump straight to a project.