Python List operations
This is code I have, but it looks like non-python.

    def __contains__(self, childName):
        """Determines if item is a child of this item"""
        for c in self.children:
            if c.name == childName:
                return True
        return False


What is the most "python" way of doing this? Use a lambda filter function? For some reason very few examples online actually work with a list of objects where you compare properties, they always show how to do this using a list of actual strings, but that's not very realistic.
Python List operations
===

This is code I have, but it looks like non-python.

    def __contains__(self, childName):
        """Determines if item is a child of this item"""
        for c in self.children:
            if c.name == childName:
                return True
        return False


What is the most "python" way of doing this? Use a lambda filter function? For some reason very few examples online actually work with a list of objects where you compare properties, they always show how to do this using a list of actual strings, but that's not very realistic.