/**
 * In this exercise, you need to create a tuple using parentheses and loop through a list to extract specific items.
 *
 * @param equipment A list of electrical equipment.
 * @param supplies A list of electrical supplies.
 * @return A tuple containing the first two items from the equipment list and the last three items from the supplies list.
 */
fun createTupleLoop(equipment: List<String>, supplies: List<String>): Triple<String, String, String> {

    // Initialize an empty tuple
    var result = Triple("", "", "")

    // Loop through the equipment list
    for (item in equipment) {
        // Extract the first two items and add them to the tuple
        if (result.first.isEmpty()) {
            result = result.copy(first = item)
        } else if (result.second.isEmpty()) {
            result = result.copy(second = item)
        }
    }

    // Initialize a counter variable
    var count = 0

    // Loop through the supplies list in reverse order
    for (item in supplies.reversed()) {
        // Extract the last three items and add them to the tuple
        result = result.copy(third = item)

        // Increment the counter
        count++

        // Break the loop after adding three items
        if (count == 3) {
            break
        }
    }

    return result
}
/**
 * In this exercise, you need to create a tuple using parentheses and loop through a list to extract specific items.
 *
 * @param equipment A list of electrical equipment.
 * @param supplies A list of electrical supplies.
 * @return A tuple containing the first two items from the equipment list and the last three items from the supplies list.
 */
fun createTupleLoop(equipment: List<String>, supplies: List<String>): Triple<String, String, String> {
/**
 * In this exercise, you need to create a tuple using parentheses and loop through a list to extract specific items.
 *
 * @param equipment A list of electrical equipment.
 * @param supplies A list of electrical supplies.
 * @return A tuple containing the first two items from the equipment list and the last three items from the supplies list.
 */
fun createTupleLoop(equipment: List<String>, supplies: List<String>): Triple<String, String, String> {

    // Initialize an empty tuple
    var result = Triple("", "", "")

    // Loop through the equipment list
    for (item in equipment) {
        // Extract the first two items and add them to the tuple
        if (result.first.isEmpty()) {
            result = result.copy(first = item)
        } else if (result.second.isEmpty()) {
            result = result.copy(second = item)
        }
    }

    // Initialize a counter variable
    var count = 0

    // Loop through the supplies list in reverse order
    for (item in supplies.reversed()) {
        // Extract the last three items and add them to the tuple
        result = result.copy(third = item)

        // Increment the counter
        count++

        // Break the loop after adding three items
        if (count == 3) {
            break
        }
    }

    return result
}