I am trying to learn python and I have no clue why the last statement results in an infinite recursive call. Can someone explain
class Container:
    tag = 'container'
    children = []
    def add(self,child):
        self.children.append(child)
    def __str__(self):
        result = '<'+self.tag+'>'
        for child in self.children:
            result += str(child)
        result += '<'+self.tag+'/>'
        return result
class SubContainer(Container):
    tag = 'sub'
c = Container()
d = SubContainer()
c.add(d)
print(c)
 
    