Learn AI, Data Science & Business — Earn Certificates That Get You Hired
Pass the PMP® Exam on Your First Try — Expert-Led Training
Overview
Build a Learning Habit
Download Class Central's free printable study calendar
Download for Free
Learn about Python's powerful "Dunder" (double underscore) or Magic Methods in this comprehensive 25-minute tutorial video that transforms how you view Python code. Explore fundamental concepts starting with Python objects and their behavior, then advance to creating custom dunder methods for enhanced functionality. Master essential methods like str() and repr() for object representation, implement arithmetic and comparison operations, understand indexing with obj[x] syntax, work with context managers for resource handling, and harness the power of iterators. Through practical demonstrations and clear explanations, gain the skills to leverage these special methods that make Python objects behave like built-in types, enabling more elegant and pythonic code design.
Syllabus
| Dunder Methods
| Understanding Python Objects
| Writing Your Own Dunder Methods
| str and repr
| Arithmetic and Comparison
| Indexing obj[x] = value
| Context Managers
| Iterators
Taught by
Tech With Tim