/**
 * Given a list of nurse names and a list of elements to remove, create a tuple using the tuple() function and
 * remove the specified elements from the original list. Return the resulting tuple.
 *
 * @param nurseList A list of nurse names.
 * @param elementsToRemove A list of elements to remove from the nurseList.
 * @return A tuple created using the tuple() function after removing the specified elements from the original list.
 *
 * Example:
 * createTupleAndRemoveElements(listOf("Alice", "Bob", "Charlie", "David"), listOf("Charlie", "Bob"))
 * Output: ('Alice', 'David')
 */
fun createTupleAndRemoveElements(nurseList: MutableList<String>, elementsToRemove: List<String>): List<String> {

    val iterator = nurseList.iterator()
    while (iterator.hasNext()) {
        val nurse = iterator.next()
        if (nurse in elementsToRemove) {
            iterator.remove()
        }
    }
    return nurseList
}
/**
 * Given a list of nurse names and a list of elements to remove, create a tuple using the tuple() function and
 * remove the specified elements from the original list. Return the resulting tuple.
 *
 * @param nurseList A list of nurse names.
 * @param elementsToRemove A list of elements to remove from the nurseList.
 * @return A tuple created using the tuple() function after removing the specified elements from the original list.
 *
 * Example:
 * createTupleAndRemoveElements(listOf("Alice", "Bob", "Charlie", "David"), listOf("Charlie", "Bob"))
 * Output: ('Alice', 'David')
 */
fun createTupleAndRemoveElements(nurseList: MutableList<String>, elementsToRemove: List<String>): List<String> {
/**
 * Given a list of nurse names and a list of elements to remove, create a tuple using the tuple() function and
 * remove the specified elements from the original list. Return the resulting tuple.
 *
 * @param nurseList A list of nurse names.
 * @param elementsToRemove A list of elements to remove from the nurseList.
 * @return A tuple created using the tuple() function after removing the specified elements from the original list.
 *
 * Example:
 * createTupleAndRemoveElements(listOf("Alice", "Bob", "Charlie", "David"), listOf("Charlie", "Bob"))
 * Output: ('Alice', 'David')
 */
fun createTupleAndRemoveElements(nurseList: MutableList<String>, elementsToRemove: List<String>): List<String> {

    val iterator = nurseList.iterator()
    while (iterator.hasNext()) {
        val nurse = iterator.next()
        if (nurse in elementsToRemove) {
            iterator.remove()
        }
    }
    return nurseList
}