This repository contains Python code examples based on Corey Schafer's excellent Object-Oriented Programming (OOP) YouTube tutorial series. I followed along with each video and implemented the code to reinforce the core concepts of OOP in Python.
Each file in this repository corresponds to a specific tutorial in the series:
- Classes and Instances - Introduction to classes, instance variables, and methods.
- Class Variables - Differences between instance and class variables.
- Classmethods and Staticmethods - Use cases for
@classmethodand@staticmethod. - Inheritance - Creating subclasses and exploring inheritance behavior.
- Magic Methods - Customizing behavior using special methods like
__repr__,__str__, etc. - Property Decorators - Using
@property,@setter, and@deleterto manage attributes cleanly.
├── _1_classes_and_instances.py
├── _2_class_variables.py
├── _3_classmethods_and_staticmethods.py
├── _4_inheritance.py
├── _5_special_methods_or_magic_methods.py
├── _6_property_decorators.py
The goal of this project is to:
- Solidify core OOP principles in Python
- Build clean and maintainable Python classes
- Prepare for advanced software development and interviews
- Corey Schafer's OOP YouTube Playlist: Watch the tutorials
Feel free to clone or fork this repo and explore the code!