300+ coding exercises
Welcome to the mid-level course on Python! In this course, you will learn a lot about more advanced features of the language and some best practices for using those. This course is designed for people who already have some background in Python and would like to improve their knowledge and learn more advanced topics.
At the end of this course, you’ll know how to use classes and be fluent in inheritance. We will cover best practices for writing code for larger projects and will use typing which helps in statically analyzing the code to detect errors. You will work with decorators and create your own utility decorators that will significantly reduce the code's size. We will discuss iterators and iterables along with the
itertools standard library.
pathlib will be used to work with the filesystem. Most importantly, we will learn how to use
await to optimize our code when working with large I/O, databases, and network requests.
In this course, you learn by doing! Each concept has several interactive challenges that you will solve to pass on to the next one. We believe that hands-on learning is the best way to get in-depth knowledge. Here you will have many challenging and at the same time interesting exercises to practice each and every concept that is covered.
You will study at your own pace. You can go hard and complete several levels in one week, or take it slow and focus on each concept for longer.
There is a forum to ask questions and get unstuck. You can ask or answer the questions of others under each challenge.
This course focuses on the core concepts and some advanced features of Python and introduces each of them in an intuitive manner. To make the process more fun and engaging, the concepts are organized into levels, and passing each level means you’ve mastered a new concept. These are the main things we will be covering here:
- Positional-only & keyword-only arguments
- Pass by value VS pass by reference (mutable arguments)
- Basics and applications of regular expressions
- Searching and matching
- Defining classes
- Setting and accessing attributes
- Defining methods inside classes
- Magic methods
- Public and private variables
- Inheriting from a base class
- Modifying the functionality by overriding a method
- Extending the functionality with the help of
- Protected variables
- Inheriting from several base classes
- Exception hierarchy
- Creating custom exceptions
- Working with libraries
- Modules in filesystem
- Module initialization
- importing variables, functions, and classes
globto work with collections of files
pathlibto work with specific files
- Removing files
- Recursively creating/deleting the whole directory
- Class variables VS instance variables
- Built-in decorators (
- Abstract classes (ABC module)
- Decorators for functions
- Decorators for classes
- Creating custom decorators
- Typing for built-in types (
- Typing for custom classes
- Typing inside a class
- Static analysis - what can we accomplish and what are the limitations
Iterators and Iterables
- Creating a custom generator
- Creating a custom iterable
- Implementing a custom context manager
- Context managers as decorators
Multithreading and Multiprocessing
- Creating a custom thread class
- Processing in pools
- Sharing data between threads and processes
awaitsyntax for functions
- Working with files
- Working with network requests
- Query through SQLAlchemy
- asyncio vs threads and processes
Wrap-up and projects
- Several supervised projects will sum up the whole material.
- This will include a lot of googling and self-study.
- You’ll automate some tasks and will learn some useful libraries
Learning is 80% individual work! Completing this course will be your accomplishment and we’re here to support that journey. You can use the section at the bottom of each exercise to ask questions or help others.