/**
 * This function removes specified elements from a given list and returns the modified list.
 *
 * @param listToModify The list from which elements need to be removed.
 * @param elementsToRemove The elements to be removed from the list.
 * @return Modified list after removing the specified elements.
 */
fun removeElementsFromList(listToModify: MutableList<Any>, elementsToRemove: List<Any>): MutableList<Any> {

    val modifiedList = listToModify.toMutableList()

    for (element in elementsToRemove) {
        if (element in modifiedList) {
            modifiedList.remove(element)
        }
    }

    return modifiedList
}
/**
 * This function removes specified elements from a given list and returns the modified list.
 *
 * @param listToModify The list from which elements need to be removed.
 * @param elementsToRemove The elements to be removed from the list.
 * @return Modified list after removing the specified elements.
 */
fun removeElementsFromList(listToModify: MutableList<Any>, elementsToRemove: List<Any>): MutableList<Any> {
/**
 * This function removes specified elements from a given list and returns the modified list.
 *
 * @param listToModify The list from which elements need to be removed.
 * @param elementsToRemove The elements to be removed from the list.
 * @return Modified list after removing the specified elements.
 */
fun removeElementsFromList(listToModify: MutableList<Any>, elementsToRemove: List<Any>): MutableList<Any> {

    val modifiedList = listToModify.toMutableList()

    for (element in elementsToRemove) {
        if (element in modifiedList) {
            modifiedList.remove(element)
        }
    }

    return modifiedList
}