In this course, you’ll learn how to make high-quality functions by giving them docstrings and restricting them to doing only one thing. You’ll also learn how to make a function using the DRY principle (“Don’t Repeat Yourself”), which helps you recognize when you need to pull part of your code into a reusable function.
You’ll learn how Python passes arguments to functions, as well as the difference between mutable and immutable variables. Finally, you’ll explore how to write your own context managers using decorators.
By the end of this course, you’ll know how decorators work, why they work, and how to use them.
Best of all, you’ll learn by doing — you’ll practice and get feedback directly in the browser.
Dataquest has helped thousands of people start new careers in data. If you put in the work and follow our course, you'll master data skills and grow your career.
We believe so strongly in our courses that we offer a full satisfaction guarantee. If you complete a career course on Dataquest and aren't satisfied with your outcome, we'll give you a refund.
Learn a proven method to acquire and use data skills.Read Article
Read more about what learners think of Dataquest.Read Article
A step by step guide to learn and master Python.Read Article
65 different Python practice exercises you can start today.Read Article
Learners who recommend
Dataquest for career advancement
Dataquest rating on
G2Crowd and SwitchUp
Average salary boost
for learners who complete a path