def merge_elements_by(seq, conn, wrapped_in_par = True):
    """Produces a string containing all elements of the sequence merged by a provided connective."""
    if len(seq) == 0:
        return ''
    elif len(seq) == 1:
        return seq[0]
    else:
        sf = '({0})' if wrapped_in_par else '{0}'
        return conn.join(sf.format(el) for el in seq)