Skip to content

Free · Python 3.12+

Python Programming

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

306
Tutorials
25
Projects
225
Practice MCQs
52 h
Reading time

What you will learn

  • Write clear, correct Python 3 programs
  • Use strings, lists, tuples, sets and dictionaries fluently
  • Structure code with functions, modules and packages
  • Build classes using object-oriented principles
  • Work with files, JSON, exceptions, iterators, generators and decorators
  • Call web APIs and store data in a database

Syllabus

20 modules · 306 topics

  1. 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.

  2. 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.

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

  4. 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.

  5. 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.

  6. 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.

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

  8. 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.

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

  10. 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.

  11. 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.

  12. 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.