import operator


def filtered_join (sep, strings, pred = None) :
    """Return a string which is the concatenation of the items in the
       iterable `strings` for which `pred` is true, separated by `sep`.

       >>> filtered_join ("-", ["", "abc", "ced"])
       'abc-ced'
       >>> filtered_join ("-", [" ", "abc", "ced"])
       ' -abc-ced'
    """
    if pred is None :
        pred = operator.truth
    return sep.join (s for s in strings if pred (s))