The ten articles
-
01
Introduction to Python
Literals, variables, syntax rules, keywords and identifiers, then a level deeper into what actually happens in memory when your code runs.
Notebook ↗
-
02
Lists, Tuples and Strings
Creating, indexing and slicing; what mutability really means; copying pitfalls; and the methods you will reach for most often.
Notebook ↗
-
03
Sets and Dictionaries
Uniqueness and set mathematics, key-value lookups, and how to choose between the two when both would technically work.
Notebook ↗
-
04
Operators
All six families, the
is versus == distinction explained properly, bitwise operators bit by bit, and operator precedence.
Notebook ↗
-
05
Conditional Statements and Loops
if / elif / else, while and for, break, continue and pass, and list comprehension as a shorter way to say the same thing.
Notebook ↗
-
06
Functions in Python
Definition versus call, parameters versus arguments, the four argument types, return versus print, and variable scope.
Notebook ↗
-
07
Types of Functions in Python
enumerate, zip, filter, map and reduce; lambda expressions; recursion; and the higher-order functions that tie them together.
Notebook ↗
-
08
Object-Oriented Programming
Classes and objects, and the four pillars: encapsulation, inheritance, polymorphism and abstraction, each with a worked example.
Notebook ↗
-
09
Exception Handling
try / except / else / finally, the exception hierarchy, raising and re-raising, assert, and building your own exception types.
Notebook ↗
-
10
File Handling
Opening, reading and writing; file modes; seek and tell; the os module and pathlib; CSV and JSON; and handling file errors gracefully.
Notebook ↗