def partner(a, b, dancers):
    """
    Swap places of dancers named a and b.

    Parameters
    ----------
    a : str
        Name of the first character to be swapped
    b : str
        Name of the second character to be swapped
    dancers : list
        A mutable sequence of characters, modified in place.
    """
    a_idx = dancers.index(a)
    b_idx = dancers.index(b)
    dancer_list = [char for char in dancers]
    dancer_list[b_idx], dancer_list[a_idx] = dancer_list[a_idx], dancer_list[b_idx]
    return ''.join(dancer_list)