def to_string(str_set, alphabet):
    """
    Convert StrSet object into a list of strings

    If str_set was created by init_strset, then using the same alphabet
    will produce the same list of strings that was used to create it

    Args:
        str_set:  StrSet object
        alphabet: List containing the characters used to define str_set

    Returns:
        str_list: A list of strings represented by str_set
    """
    index_mat, str_lens = str_set.index_mat, str_set.str_lens
    ind2char = {i: c for i, c in enumerate(alphabet)}

    # First create all the strings encoded by index_mat, then use str_lens
    # to truncate them to their proper length
    str_list = [''.join(ind2char[i] for i in row) for row in index_mat]
    str_list = [string[:s_len] for string, s_len in zip(str_list, str_lens)]

    return str_list