Python Basics
Your first lines of code: comments, data types, print() and variables.
Indentation and commentsData typesThe print() functionVariablesOperators
13 levels
Free
Conditionals
Teach your programs to make decisions with if, elif and else.
Conditional keywordsSimple conditionsLogical operatorsinput()
12 levels
Premium
Iteration
Repeat work with loops, and control exactly when they stop.
while and for loopsrange() and enumerate()break, continue and pass
19 levels
Premium
Functions
Package code into functions you can call, reuse and share.
Creating and calling functionsreturn vs. print()Parameters and arguments*args and **kwargsModules
18 levels
Premium
Strings & Lists
Work with text and collections: slice them, search them, change them.
String slicingString methodsLists and indexingNested listsList methods
35 levels
Premium
Dictionaries, Sets & Tuples
Store data by key, and pick the right collection for the job.
Dictionary basicsDictionary methodsLooping through dictionariesTuples and sets
17 levels
Premium
Files, Exceptions & Tests
Read and write files, handle errors, and test that your code works.
Reading and writing filesThe with statementHandling exceptionsTesting your code
14 levels
Premium
Classes & Objects
Model the world with your own classes, methods and inheritance.
Classes and objectsAttributes and methodsInheritanceDunder methodsunittest
15 levels
Premium
Stacks, Queues & Trees
Classic data structures, recursion and tree traversals.
Stacks and queuesRecursionTrees and traversalsBinary trees
20 levels
Premium