def __init__(self, name, children=None):
    self.name = name
if children is None:
    self.children = []
else:
    self.children = children
Python adding element to an instance's list also adds it to another instance's list