import string


def remove_punctuation(list_of_string, item_to_keep=""):

    """
    Remove punctuation from a list of strings.
    
    Parameters
    ----------
    - list_of_string : a dataframe column or variable containing the text stored as a list of string sentences
    - item_to_keep : a string of punctuation signs you want to keep in text (e.g., '!?.,:;')
    """

    # Update string of punctuation signs
    if len(item_to_keep) > 0:

        punctuation_list = "".join(
            c for c in string.punctuation if c not in item_to_keep
        )

    else:

        punctuation_list = string.punctuation

    # Remove punctuation from each sentence
    transtable = str.maketrans("", "", punctuation_list)

    return [sent.translate(transtable) for sent in list_of_string]