
Explore object oriented programming in Python, comparing procedural and object approaches. Learn how classes create objects with attributes and methods, uniting data and code for large, complex projects.
Use the class keyword to define a python class with an initial uppercase name, and include pass when empty; instantiate objects by calling the class and using lowercase names.
Explain how to define a class with an __init__ constructor and its self parameter, show the init method, and demonstrate implicit invocation of the constructor when creating an object.
Create and access instance variables in a class using self and dot notation. Initialize them in the constructor and extend objects with new properties.
Learn how to define and access class variables in Python, distinguishing them from instance variables, using a class name to access the variable and print its value.
Explore Python's getattr and setattr functions within a class example, creating and modifying instance variables like name and number to demonstrate dynamic attribute access and assignment.
Explore how the Python class attribute __class__ reveals the exact class of a class, its objects, and methods, illustrated with an info class, its instances, and a get value method.
Learn how to use __dict__ on objects and classes to inspect attributes, distinguishing class variables and instance variables, as shown with an example class and its dict output.
Implement a class with first and last attributes and a __str__ method that returns 'first last' using self, then demonstrate printing the object to display the name.
Learn how the __name__ property exposes the class name and why it does not exist on instances, then use type(obj).__name__ to reveal the object's class.
Access class methods and instance variables without creating an object, then use a class object to call info and print the item, illustrating data class usage.
Learn how to create a private instance variable in a Python class using a double underscore, demonstrating encapsulation and restricted outside access, and handling an attribute error.
Access private properties through a class method in Python by updating and returning a private __val with a get method, demonstrated with a.get(6) yielding 7.
Explore Python name mangling, accessing private class and instance variables using double underscores, and the limits of privacy in object oriented programming.
Learn how to define and access a private method inside a class using double underscores, explore name mangling, and distinguish private, instance, and class variables in Python through practical examples.
Explore how inheritance lets a subclass reuse and extend a superclass's methods and attributes, with practical examples using house, car, and motorcycle to illustrate multi-level inheritance.
This lecture shows how a subclass inherits class variables, instance variables, and methods from a superclass in Python, using a date variable, a number, and the Functa method.
Learn how a Python superclass method is inherited and overridden by a subclass, with A's info and funk methods and B's overridden funk displaying object two.
Explore how a subclass inherits the superclass property and overrides the number attribute, calls the superclass constructor, and uses the __str__ method to display 'my lucky number is' with values.
Learn how to use the super function to access and modify a superclass's instance variable in a subclass, implement __init__, and display objects to show inherited behavior.
Demonstrates multiple inheritance in Python by combining class A and class B into subclass C. Shows left to right resolution: date from A is 2023; age comes from B.
Explore the __bases__ attribute in Python, showing how a class's superclasses are retrieved as a tuple and how inheritance and object fit into the hierarchy.
Master the hasattr function to verify whether an object or class has a specific attribute, using an example class, an instance variable, and boolean results.
Check whether one class is a subclass of another using the issubclass function, which returns a boolean, illustrated by House, Car, and Motorcycle relationships.
Demonstrate the isinstance function in Python by checking objects A, B, and C against house, car, and motorcycle classes, illustrating inheritance and boolean results.
Explore Python's magic __add__ by building an information class with init, name, and age, creating two objects, and adding them to display name and other's age via str.
Explore the __sub__ magic method by subtracting the age of one information object from another, using name and age attributes, shown with 33 minus 26 equals 7.
Build a python calculator class with special methods __str__ and __mul__, a helper add method, and instance checks to perform addition and multiplication and handle errors.
Explore Python's magic methods and learn how they work within object oriented programming. Practice identifying and experimenting with several magic methods to understand their function.
Explore polymorphism through inheritance by using a car superclass and bicycle and walk subclasses, each with a distance method invoked via a single interface.
Duck typing enables polymorphism by checking for a method on each object rather than relying on inheritance, as car and bicycle have distance while walk does not.
Explore static methods in python with @staticmethod, creating a utility method that avoids object creation, and use random.choice to drive conditional returns like welcome or try again.
Explore how to integrate @classmethod and @staticmethod within a Python class, manage a class variable by incrementing it on instantiation, and create vanilla chocolate descriptions.
Explore how *args and **kwargs handle extra arguments in Python functions, placing them as the last two parameters and collecting unmatched positional as a tuple and keyword as a dictionary.
Learn how forwarding works in Python by examining a view numbers function with *args and **kwargs, and how positional, keyword, and dictionary parameters flow through nested functions.
Explore the concept of decorators in Python, showing how decorators can decorate functions, methods, and classes through a practical example that wraps a function and alters its behavior.
Explore decorators with arguments in Python using closures to pass parameters and return the inner function, enabling decorated functions that handle arguments and display messages.
Learn how to decorate a single function with two decorators and how the order affects arguments and outputs, including name and info parameters.
Transform a class into a callable decorator by implementing __call__ and assigning a function to self.function, then decorate a function with the introduction decorator to handle keyword arguments.
Explore how a class decorator with arguments accepts parameters like img, assigns them to data, uses closures to pass arguments to the wrapped function, and returns the function itself.
Discover how abstract classes enforce design via abstraction and abstract methods, using the ABC module and inheritance to override methods and enable polymorphic behavior.
Study composition in object oriented programming by building a forecast class that contains another object. Access the contained object's properties and methods via the has a relationship, contrasting with inheritance.
Create and compose objects from electric and fuel classes within a vehicles class, access nested instance variables, and call methods to display year, mileage, name, and speed.
Learn encapsulation in python by using the property decorator to expose a private occupation via a getter, setter, and deleter, with an info class and controlled attribute access.
Ready to write clean, efficient, and reusable Python code?
This course teaches you how to master Object-Oriented Programming (OOP) in Python so you can build professional, maintainable software applications. Through hands-on exercises and real-world projects, you’ll learn to structure your code around objects instead of just functions — making your programs clearer, more efficient, and easier to maintain.
Why This Course Is Different:
Focuses on practical application, not just theory
Hands-on projects that reinforce every concept
Learn best practices, design patterns, and debugging techniques
Step-by-step explanations designed for beginners and intermediate Python users
Who This Course Is For:
Python learners ready to move beyond basics
Students who want to write professional-quality, maintainable code
Hobbyists or developers looking to understand OOP deeply
Anyone preparing for technical interviews or real-world projects
What You’ll Learn:
Master core OOP concepts: Classes, Inheritance, Composition, Encapsulation, Polymorphism, Abstraction
Use inheritance to extend and reuse code efficiently
Apply composition to create complex, maintainable objects
Implement encapsulation to protect and organize your data
Work with design patterns for cleaner, scalable code
Debug and optimize Python OOP code like a pro
Build real-world projects and exercises using OOP principles
Requirements:
Basic knowledge of Python fundamentals
A computer with Python installed
Willingness to practice through exercises and projects
- Start Building Professional Python Code Today
Enroll now and level up your Python skills! Master OOP, create reusable code, and build projects that demonstrate your programming expertise.