
Complete Python Mastery
A comprehensive Python course by Mosh Hamedani that works through the language from the basics into the breadth of its ecosystem: primitive types, control flow and functions, a large chapter on data structures (lists, tuples, sets, dictionaries, comprehensions, generators), exceptions, and an extensive part on object-oriented programming — from magic methods and properties through multiple inheritance and abstract base classes to polymorphism, duck typing and data classes. Plus modules and packages, the standard library (files, CSV, JSON, SQLite, date and time, e-mail, subprocesses), the Python Package Index including publishing your own packages, as well as practical modules on web scraping, browser automation, Excel and NumPy, a Django web application through to deployment, and an introduction to machine learning with scikit-learn. Fully completed (all lessons).
Contents & competencies
- Language basics: variables, strings with escape sequences and f-strings, numbers, type conversion
- Control flow: comparison and logical operators, short-circuit evaluation, chained comparisons, for and while loops, nested loops, iterables
- Functions: arguments, keyword and default arguments, *args and **kwargs, scope and debugging
- Data structures in breadth: lists with unpacking and sorting, lambda, map and filter, list and dictionary comprehensions, zip, stacks, queues, tuples, arrays, sets, dictionaries, generator expressions and the unpacking operator
- Exceptions: handling them deliberately, cleaning up, the with statement, raising your own exceptions and judging what they cost
- Object orientation: constructors, class versus instance attributes and methods, magic methods, operator overloading, custom containers, private members, properties
- Inheritance and polymorphism: method overriding, multi-level and multiple inheritance, abstract base classes, duck typing, extending built-in types, data classes
- Modules and packages: the module search path, packages and sub-packages, intra-package references, running a module as a script
- Standard library: paths, directories and files, zip, CSV, JSON, SQLite, timestamps and datetimes, random values, sending e-mail, templates, CLI arguments, external programs
- The package ecosystem: PyPI and pip, virtual environments with Pipenv, dependency management, publishing your own packages, docstrings and pydoc
- Practical packages: consuming REST APIs, hiding API keys, sending SMS, web scraping, browser automation, PDFs and Excel files, NumPy
- Django: views, models and migrations, customising the admin, templates with Bootstrap, URL parameters, 404 handling, building APIs and deploying the application
- Machine learning: reading in and preparing datasets, training models and making predictions, calculating accuracy, persisting models and visualising a decision tree
Syllabus
The course page states 12 hours and 200 lessons across 13 sections but lists individual lessons only for “Getting Started”. The outline here is therefore taken from the course player and shows all 187 lessons that were included at completion in June 2025; it lists “Getting Started” as two modules where the course page names one. The Code with Mosh certificate itself states no scope. On the course page the course is now called The Complete Python Programming Course.
Getting Started4 lessons
- Welcome
- Questions and Support
- Connect with Me
- Learning Paths
Getting Started with Python32 min · 12 lessons
- What is Python
- Installing Python
- Python Interpreter
- Code Editors
- Bonus: Redeem Your FREE Access to PyCharm
- Your First Python Program
- Python Extension
- Formatting Python Code
- Running Python Code
- Python Implementations
- How Python Code is Executed
- Quiz
Primitive Types34 min · 10 lessons
- Variables
- Variable Names
- Strings
- Escape Sequences
- Formatted Strings
- String Methods
- Numbers
- Working with Numbers
- Type Conversion
- Quiz
Control Flow37 min · 14 lessons
- Comparison Operators
- Conditional Statements
- Ternary Operator
- Logical Operators
- Short-circuit Evaluation
- Chaining Comparison Operators
- Quiz
- For Loops
- For..Else
- Nested Loops
- Iterables
- While Loops
- Infinite Loops
- Exercise
Functions41 min · 14 lessons
- Defining Functions
- Arguments
- Types of Functions
- Keyword Arguments
- Default Arguments
- *args
- **kwargs
- Scope
- Debugging
- VSCode Coding Tricks — Windows
- VSCode Coding Tricks — Mac
- Exercise
- Solution
- A Quick Note
Data Structures1 hr 20 min · 23 lessons
- Lists
- Accessing Items
- List Unpacking
- Looping over Lists
- Adding or Removing Items
- Finding Items
- Sorting Lists
- Lambda Functions
- Map Function
- Filter Function
- List Comprehensions
- Zip Function
- Stacks
- Queues
- Tuples
- Swapping Variables
- Arrays
- Sets
- Dictionaries
- Dictionary Comprehensions
- Generator Expressions
- Unpacking Operator
- Exercise
Exceptions20 min · 7 lessons
- Exceptions
- Handling Exceptions
- Handling Different Exceptions
- Cleaning Up
- The With Statement
- Raising Exceptions
- Cost of Raising Exceptions
Classes1 hr 25 min · 22 lessons
- Classes
- Creating Classes
- Constructors
- Class vs Instance Attributes
- Class vs Instance Methods
- Magic Methods
- Comparing Objects
- Performing Arithmetic Operations
- Making Custom Containers
- Private Members
- Properties
- Inheritance
- The Object Class
- Method Overriding
- Multi-level Inheritance
- Multiple Inheritance
- A Good Example of Inheritance
- Abstract Base Classes
- Polymorphism
- Duck Typing
- Extending Built-in Types
- Data Classes
Modules20 min · 8 lessons
- Creating Modules
- Compiled Python Files
- Module Search Path
- Packages
- Sub-packages
- Intra-package References
- The dir Function
- Executing Modules as Scripts
Python Standard Library1 hr · 17 lessons
- Python Standard Library
- Working With Paths
- Working with Directories
- Working with Files
- Working with Zip Files
- Working with CSV Files
- Working with JSON Files
- Working with a SQLite Database
- Working with Timestamps
- Working with DateTimes
- Working with Time Deltas
- Generating Random Values
- Opening the Browser
- Sending Emails
- Templates
- Command-line Arguments
- Running External Programs
Python Package Index48 min · 10 lessons
- Pypi
- Pip
- Virtual Environments
- Pipenv
- Virtual Environments in VSCode
- Pipfile
- Managing Dependencies
- Publishing Packages
- Docstrings
- Pydoc
Popular Python Packages1 hr 30 min · 12 lessons
- Introduction
- What are APIs
- Yelp API
- Searching for Businesses
- Hiding API Keys
- Sending Text Messages
- Web Scraping
- Browser Automation
- Working with PDFs
- Working with Excel Spreadsheets
- Command Query Separation Principle
- NumPy
Building Web Applications with Django2 hrs · 22 lessons
- Introduction
- Your First Django Project
- Your First App
- Views
- Models
- Migrations
- Changing the Models
- Admin
- Customizing the Admin
- Database Abstraction API
- Templates
- Adding Bootstrap
- Customizing the Layout
- Sharing a Template Across Multiple Apps
- Url Parameters
- Getting a Single Object
- Raising 404 Errors
- Referencing Urls
- Creating APIs
- Adding the Homepage
- Getting Ready to Deploy
- Deployment
Machine Learning with Python48 min · 12 lessons
- What is Machine Learning
- Machine Learning in Action
- Libraries and Tools
- Importing a Data Set
- Jupyter Shortcuts
- A Real Machine Learning Problem
- Preparing the Data
- Learning and Predicting
- Calculating the Accuracy
- Persisting Models
- Visualizing a Decision Tree
- Thank You