def lsearch(l,pattern):
    """ Search for items in list l that have substring match to pattern. """
    rvals = []
    for v in l:
        if not v.find(pattern) == -1:
            rvals.append(v)
    return rvals