Skip to content

20 modules ยท 306 tutorials

Python Programming tutorials

The most readable way into programming: from your first print() to OOP, files, exceptions, generators, decorators, APIs and databases.

Module 01

Introduction to Python

What Python is, where it came from, where it is used, and how to install it, set up VS Code and run your first programs.

  1. What is Python? 12m
  2. History of Python 12m
  3. Why Python is popular 10m
  4. Features of Python 14m
  5. Applications of Python 12m
  6. Python in real-world development 14m
  7. Python compared with other languages 14m
  8. Installing Python 15m
  9. Setting up VS Code 15m
  10. Installing Python extensions 12m
  11. Writing your first Python program 15m
  12. Understanding the Python interpreter 14m
  13. Source code and execution 15m
  14. Interactive mode versus script mode 12m

Module 02

Python Syntax and Fundamentals

The grammar of Python: indentation, statements and expressions, comments and docstrings, keywords and names, input and output, type conversion and reading syntax errors.

  1. Python syntax 12m
  2. Indentation 12m
  3. Statements 12m
  4. Expressions 12m
  5. Comments 10m
  6. Documentation strings 12m
  7. Keywords 10m
  8. Identifiers 10m
  9. Naming conventions 10m
  10. Input and output 12m
  11. print() 12m
  12. input() 12m
  13. Type conversion 14m
  14. Syntax errors 14m

Module 03

Variables and Data Types

How Python stores and names values: variables and assignment, dynamic typing, numbers, strings, Booleans, None, type checking and conversion, mutability and a first look at scope.

  1. Variables 12m
  2. Assignment 12m
  3. Naming rules 10m
  4. Dynamic typing 12m
  5. Integers 12m
  6. Floating-point numbers 14m
  7. Strings 12m
  8. Booleans 10m
  9. Complex numbers 10m
  10. type() 10m
  11. Type casting 12m
  12. Mutable and immutable objects 14m
  13. None 10m
  14. Multiple assignment 10m
  15. Variable scope introduction 12m

Module 04

Operators

Every Python operator in depth: arithmetic, comparison, logical, assignment, bitwise, membership and identity operators, then how precedence and associativity decide the order of evaluation.

  1. Arithmetic operators 12m
  2. Addition 10m
  3. Subtraction 10m
  4. Multiplication 10m
  5. Division 12m
  6. Floor division 10m
  7. Modulus 12m
  8. Exponentiation 10m
  9. Comparison operators 12m
  10. Logical operators 14m
  11. Assignment operators 10m
  12. Bitwise operators 14m
  13. Membership operators 10m
  14. Identity operators 10m
  15. Operator precedence 12m
  16. Associativity 10m

Module 05

Conditional Statements

How programs make decisions: if, if-else and if-elif-else, nested and combined conditions, conditional expressions, truthiness and the mistakes beginners make most often.

  1. Decision-making 12m
  2. if 10m
  3. if-else 10m
  4. if-elif-else 12m
  5. Nested conditions 12m
  6. Multiple conditions 12m
  7. Logical expressions 12m
  8. Conditional expressions 10m
  9. Truthy and falsy values 10m
  10. Common mistakes 14m

Module 06

Loops and Iteration

Repeating work with while and for loops: range(), how loops execute, nested loops, break, continue, pass, avoiding infinite loops, loop else clauses and the basics of iteration.

  1. Why loops are required 10m
  2. while loops 12m
  3. for loops 12m
  4. range() 10m
  5. Loop execution 12m
  6. Nested loops 12m
  7. break 10m
  8. continue 10m
  9. pass 8m
  10. Infinite loops 10m
  11. Loop else clauses 10m
  12. Iteration basics 12m

Module 07

Strings

Working with text in depth: creating strings, indexing and slicing, joining and repeating, immutability, the essential string methods, formatting with format() and f-strings, escapes and multi-line text.

  1. Creating strings 10m
  2. Indexing 10m
  3. Negative indexing 8m
  4. Slicing 12m
  5. Concatenation 10m
  6. Repetition 8m
  7. Immutability 10m
  8. String methods 12m
  9. upper() 8m
  10. lower() 8m
  11. strip() 10m
  12. replace() 10m
  13. split() 12m
  14. join() 10m
  15. find() 10m
  16. count() 8m
  17. startswith() 8m
  18. endswith() 8m
  19. String formatting 12m
  20. f-strings 12m
  21. Escape characters 10m
  22. Multiline strings 10m

Module 08

Python Data Structures

Lists, tuples, sets and dictionaries in depth: creating, indexing, slicing, updating and nesting them, set algebra, dictionary methods, and how to choose the right structure for a problem.

  1. Data structure introduction 12m
  2. Lists 12m
  3. List creation 10m
  4. Indexing 10m
  5. Slicing 12m
  6. List methods 12m
  7. Adding and removing elements 12m
  8. Updating elements 10m
  9. Nested lists 12m
  10. Tuples 10m
  11. Tuple operations 10m
  12. Sets 10m
  13. Set operations 12m
  14. Union 8m
  15. Intersection 8m
  16. Difference 8m
  17. Dictionaries 12m
  18. Dictionary keys and values 10m
  19. Updating dictionaries 12m
  20. Dictionary methods 10m
  21. Nested dictionaries 12m
  22. Choosing appropriate data structures 14m

Module 09

Functions

Defining and calling functions, parameters and every kind of argument (positional, keyword, default, *args, **kwargs), return values, scope, lambdas, recursion, docstrings and good function design.

  1. Functions 10m
  2. Function definition 10m
  3. Function calls 10m
  4. Parameters 10m
  5. Arguments 10m
  6. Positional arguments 8m
  7. Keyword arguments 8m
  8. Default arguments 10m
  9. *args 8m
  10. **kwargs 8m
  11. Return statements 8m
  12. Multiple return values 8m
  13. Local variables 8m
  14. Global variables 8m
  15. Scope 12m
  16. Lambda functions 8m
  17. Recursion 15m
  18. Docstrings 8m
  19. Function best practices 12m

Module 10

Comprehensions and Advanced Iteration

List, dictionary and set comprehensions (with conditions and nesting), generator expressions, iterables and iterators, iter() and next(), generator functions with yield, and lazy evaluation.

  1. List comprehensions 10m
  2. Conditional comprehensions 10m
  3. Nested comprehensions 12m
  4. Dictionary comprehensions 10m
  5. Set comprehensions 8m
  6. Generator expressions 10m
  7. Iterables 10m
  8. Iterators 12m
  9. iter() 8m
  10. next() 8m
  11. Generators 12m
  12. yield 10m
  13. Lazy evaluation 10m

Module 11

Object-Oriented Programming

Classes and objects, attributes and methods, constructors and self, instance and class variables, class and static methods, encapsulation, every form of inheritance, overriding, polymorphism, abstraction, abstract classes, properties, special methods and composition.

  1. Introduction to OOP 10m
  2. Classes 10m
  3. Objects 10m
  4. Attributes 10m
  5. Methods 10m
  6. Constructors 10m
  7. __init__() 10m
  8. self 8m
  9. Instance variables 8m
  10. Class variables 8m
  11. Instance methods 8m
  12. Class methods 10m
  13. Static methods 8m
  14. Encapsulation 10m
  15. Inheritance 12m
  16. Single inheritance 8m
  17. Multiple inheritance 12m
  18. Multilevel inheritance 8m
  19. Method overriding 10m
  20. Polymorphism 10m
  21. Abstraction 8m
  22. Abstract classes 10m
  23. Properties 10m
  24. Special methods 12m
  25. Composition 10m

Module 12

Exception Handling

What exceptions are, syntax versus runtime errors, the common built-in exceptions, try/except/else/finally, handling several exceptions and exception groups, raising and chaining exceptions, custom exception hierarchies and best practices.

  1. Exceptions 8m
  2. Syntax errors versus runtime errors 8m
  3. Common exceptions 10m
  4. try 8m
  5. except 10m
  6. else 6m
  7. finally 8m
  8. Multiple exception handling 10m
  9. Raising exceptions 10m
  10. Custom exceptions 10m
  11. Best practices 10m

Module 13

File Handling

Opening, reading, writing and appending files, file modes, closing and with statements, text, CSV and JSON files, paths, directories, pathlib and the exceptions file operations raise.

  1. File handling introduction 8m
  2. Opening files 8m
  3. Reading 10m
  4. Writing 8m
  5. Appending 6m
  6. File modes 8m
  7. Closing files 6m
  8. with statements 10m
  9. Text files 8m
  10. CSV files 10m
  11. JSON files 10m
  12. File paths 8m
  13. Directories 10m
  14. pathlib 10m
  15. File exceptions 10m

Module 14

Python Modules and Packages

Modules and how import works, creating your own modules, from-imports and aliases, a tour of the standard library, packages and __init__.py, installing packages with pip, virtual environments, requirements.txt and organising real projects.

  1. Modules 8m
  2. Creating modules 10m
  3. import 8m
  4. Importing specific functions 8m
  5. Aliases 6m
  6. Standard library 10m
  7. Packages 10m
  8. __init__.py 8m
  9. Installing packages 8m
  10. pip 8m
  11. Virtual environments 10m
  12. requirements.txt 8m
  13. Project organization 10m

Module 15

Python Standard Libraries

A practical tour of the most useful standard modules: math, random, datetime, time, os, sys, pathlib, json, csv, collections, itertools, statistics and re.

  1. math 8m
  2. random 8m
  3. datetime 10m
  4. time 8m
  5. os 10m
  6. sys 8m
  7. pathlib 8m
  8. json 10m
  9. csv 8m
  10. collections 10m
  11. itertools 10m
  12. statistics 10m
  13. re 12m

Module 16

External Libraries and APIs

Choosing and installing third-party libraries, dependencies and virtual environments in practice, first steps with NumPy, pandas, Matplotlib and requests, and calling web APIs: HTTP requests, JSON responses and working with external data.

  1. External libraries 8m
  2. Installing packages 8m
  3. Dependencies 8m
  4. Virtual environments 8m
  5. NumPy introduction 12m
  6. Pandas introduction 12m
  7. Matplotlib introduction 10m
  8. Requests introduction 10m
  9. APIs 10m
  10. HTTP requests 10m
  11. JSON responses 10m
  12. Working with external data 10m

Module 17

Advanced Python Concepts

Mutability, references, shallow and deep copies, memory management and garbage collection, first-class functions, closures, decorators, context managers, type hints, annotations, dataclasses and enums.

  1. Mutable versus immutable objects 10m
  2. References 8m
  3. Shallow copy 8m
  4. Deep copy 8m
  5. Memory management 10m
  6. Garbage collection 10m
  7. First-class functions 10m
  8. Closures 10m
  9. Decorators 12m
  10. Context managers 10m
  11. Type hints 10m
  12. Annotations 8m
  13. Dataclasses 10m
  14. Enums 10m

Module 18

Algorithms and Problem Solving

What algorithms are, a problem-solving method, flowcharts and pseudocode, time and space complexity, Big-O notation, linear and binary search, bubble, selection and insertion sort, recursion problems, stacks, queues, frequency counting, two pointers and common problem-solving patterns.

  1. Algorithms 8m
  2. Problem-solving methodology 10m
  3. Flowcharts 8m
  4. Pseudocode 8m
  5. Time complexity 10m
  6. Space complexity 8m
  7. Big-O notation 10m
  8. Linear search 8m
  9. Binary search 10m
  10. Bubble sort 8m
  11. Selection sort 8m
  12. Insertion sort 10m
  13. Recursion problems 12m
  14. Stacks 10m
  15. Queues 10m
  16. Frequency counting 10m
  17. Two-pointer techniques 10m
  18. Common problem-solving patterns 12m

Module 19

Debugging, Testing and Best Practices

Debugging methodically, kinds of programming errors, reading tracebacks, the VS Code debugger and print/logging debugging, assertions, unit testing with unittest and pytest, designing test cases, PEP 8, readability, naming, documentation, code organisation and maintainable programs.

  1. Debugging 10m
  2. Programming errors 8m
  3. Reading tracebacks 8m
  4. VS Code debugging 10m
  5. print-based debugging 8m
  6. Assertions 8m
  7. Unit testing 12m
  8. pytest 12m
  9. Writing test cases 10m
  10. PEP 8 8m
  11. Code readability 8m
  12. Naming conventions 8m
  13. Documentation 10m
  14. Code organization 10m
  15. Maintainable programs 10m

Module 20

Building Real Python Applications

Planning an application, breaking it into components, structuring the program, functions and classes in application design, input validation, application-level exception handling, data persistence and JSON storage, testing and debugging applications, improving code quality and preparing projects for demonstration.

  1. Application planning 10m
  2. Breaking problems into components 10m
  3. Program structure 10m
  4. Functions and modularity 10m
  5. Classes and application design 12m
  6. Input validation 10m
  7. Exception handling 10m
  8. Data persistence 10m
  9. JSON storage 10m
  10. Application testing 12m
  11. Debugging applications 10m
  12. Improving code quality 10m
  13. Preparing projects for demonstration 10m