Finding an item name starting or ending with from a list
Use first class functions, not hardcoded strings:

def _isobjectInList(lst, name, criteria=str.startswith):
    """
    &gt;&gt;&gt; _isobjectInList(['foobaz','null'],'foo')
    ['foobaz']
    """
    return [i for i in lst if criteria(i, name)]


also give it a better name