/**
 * This function modifies a given list by replacing all occurrences of a particular value with a new value.
 */
fun modifyListWithLoops(inputList: MutableList<String>, value: String): List<String> {

    for (i in inputList.indices) {
        if (inputList[i] == value) {
            inputList[i] = "New Value"
        }
    }
    return inputList
}
/**
 * This function modifies a given list by replacing all occurrences of a particular value with a new value.
 */
fun modifyListWithLoops(inputList: MutableList<String>, value: String): List<String> {
/**
 * This function modifies a given list by replacing all occurrences of a particular value with a new value.
 */
fun modifyListWithLoops(inputList: MutableList<String>, value: String): List<String> {

    for (i in inputList.indices) {
        if (inputList[i] == value) {
            inputList[i] = "New Value"
        }
    }
    return inputList
}