In this Python Tutorial for Beginners video I am going to show How to use Class Composition in Python. Composition allows us to delegate some responsibility from one class to another class.
In Class Composition one class acts like a Container and other acts like a content. Composition represents “part-of” relationship.When there is a composition between two Python classes , the content object cannot exist without the container object.

In this Python Tutorial for Beginners video I am going to show How to use Class Aggregation in Python. Also I am going to give the Difference between Aggregation and Composition with a python example.Aggregation represents Has-A relationship.
Aggregation has a unidirectional association i.e. a one way relationship between associated classes.In Aggregation, both the associate class objects can survive individually.

#python

Python OOP Tutorials | Composition and Aggregation
65.05 GEEK