1# In parent Class
2def __init__(self, attributes):
3 for key, value in attributes.items():
4 self.__dict__[key] = value
5# In child Class
6def __init__(self, **kwargs):
7 attributes = {k:v for k,v in kwargs.items() if v}
8 super().__init__(attributes)