import copy


def purge_substrings(string, substrings):
    """ Deletes all occurrences of any substring provided from the 
    original string.

    Parameters
    ----------
    string : string
        The string to be purged of all substrings.
    substrings : string or list
        The substrings in a list, or a string by itself.

    Returns
    -------
    purged_string : string
        The string after it had all substring occurrences taken out.    
    """
    # Just in case.
    original_string = copy.deepcopy(string)

    # Check if the substring is singular or is a list of substrings. 
    # It is better to handle a one long list.
    if (isinstance(substrings, str)):
        substrings = [substrings,]
    
    # Purge all substrings using the built-in replace method and 
    # going through.
    for substringdex in substrings:
        original_string = original_string.replace(substringdex, '')

    # Naming convention.
    purged_string = original_string
    return purged_string