def get_first(somelist, function):
    """ Returns the first item of somelist for which function(item) is True """
    for item in somelist:
        if function(item):
            return item
    return None