def join_filter_empty(sep, *elems):
    """
    Join a sequence of elements by ``sep``, filtering out empty elements.

    Example
    -------
    >>> join_filter_empty(':', 'a', None, 'c')
    'a:c'
    >>> join_filter_empty(':', 'a', None)
    'a'
    """
    return sep.join(map(str, filter(None, elems)))