has_child

returns True if the element has child element(s).

Source


def has_child(self):
    return len(self._children) != 0