/**
 * This function takes two lists as input: 'names' and 'instruments',
 * and combines them to create a list of pairs, where each pair contains
 * the name of a musician and their corresponding instrument.
 *
 * @param names A list of musician names.
 * @param instruments A list of corresponding instruments.
 * @return A list of pairs, each pair containing a musician name and instrument pair.
 */
fun createListWithInitialElements(names: List<String>, instruments: List<String>): List<Pair<String, String>> {

    val musicians = mutableListOf<Pair<String, String>>() // Final list to store musician and instrument pairs

    // Loop through each element in 'names' and 'instruments' lists
    for (i in names.indices) {
        // Create a pair of musician name and instrument
        val musician = Pair(names[i], instruments[i])

        // Add the pair to 'musicians' list
        musicians.add(musician)
    }

    return musicians
}
/**
 * This function takes two lists as input: 'names' and 'instruments',
 * and combines them to create a list of pairs, where each pair contains
 * the name of a musician and their corresponding instrument.
 *
 * @param names A list of musician names.
 * @param instruments A list of corresponding instruments.
 * @return A list of pairs, each pair containing a musician name and instrument pair.
 */
fun createListWithInitialElements(names: List<String>, instruments: List<String>): List<Pair<String, String>> {
/**
 * This function takes two lists as input: 'names' and 'instruments',
 * and combines them to create a list of pairs, where each pair contains
 * the name of a musician and their corresponding instrument.
 *
 * @param names A list of musician names.
 * @param instruments A list of corresponding instruments.
 * @return A list of pairs, each pair containing a musician name and instrument pair.
 */
fun createListWithInitialElements(names: List<String>, instruments: List<String>): List<Pair<String, String>> {

    val musicians = mutableListOf<Pair<String, String>>() // Final list to store musician and instrument pairs

    // Loop through each element in 'names' and 'instruments' lists
    for (i in names.indices) {
        // Create a pair of musician name and instrument
        val musician = Pair(names[i], instruments[i])

        // Add the pair to 'musicians' list
        musicians.add(musician)
    }

    return musicians
}