
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Solution to the first coding exercise
Learn how the enumerate function adds a counter to an iterable and returns an enumerate object for loops, with a start index to map fruits like apple and pineapple.
Learn how lambda functions, or anonymous functions, work in Python, using the concise lambda syntax for single expressions; explore multi-parameter lambdas and common pitfalls like late binding.
Explore how the map function applies a function to each item in a collection, replacing loops with concise Python code using lambdas or def functions to capitalize fruits.
Discover how the filter function creates an iterator to select elements that satisfy a condition, using a lambda function on lists and dictionaries with practical examples.
Explore the xor operation, its truth table, and how to implement exclusive or in Python using map and zip over two lists of 0s and 1s.
Learn how generators simplify creating iterators with yield, enabling memory-efficient sequences like powers of two and infinite streams, and how generator expressions support pipelined computations.
Explore the any and all functions in Python, learn their truth conditions on non-empty and empty iterables, and apply them with map and lambda on fruit examples.
Create closures by defining a nested function that captures an enclosing variable and returns the inner function. Use nonlocal to modify that variable, enabling data hiding and supporting decorators.
Welcome to Learn Python by doing!
Tired of the same Python course teaching you data types and printing the same message in a for loop? It's time to learn exciting things!
In this course, you will learn a lot of built in functionalities for you to become a better Python developer. You will also learn how to implement best practices and some unit testing. Some of the things that you will learn in this course are:
The zip function, the map function, the reduce function (with lots of exercises, obviously!)
Virtual environments, dependency management, deterministic builds, dependency resolution and more!
How to implement your own iterators and generators
How to sort things like a pro
Learn about closures (which is a concept that is not specific to Python)
Learn about decorators and some useful ones that come with Python
Sets and why are they cool (with fun exercises)
TDD and unit testing with Pytest
And more! Also, you will be asked to do some interesting exercises along the way, so you reinforce what you learn in this course.
Have fun and enjoy!