/**
 * In this exercise, you need to create a tuple by combining a list of names and a list of ages.
 * Then, you should print the tuple to the console.
 *
 * @param names A list of strings representing names.
 * @param ages A list of integers representing ages.
 */
fun createTupleAndPrint(names: List<String>, ages: List<Int>) {

    // Use the zip() function to iterate over the lists simultaneously and create a list of pairs
    val result = names.zip(ages)
    // Convert the list of pairs to a tuple by flattening it
    val tuple = result.flatMap { it.toList() }
    // Print the resulting tuple
    println(tuple)
}

// Example usage
/**
 * In this exercise, you need to create a tuple by combining a list of names and a list of ages.
 * Then, you should print the tuple to the console.
 *
 * @param names A list of strings representing names.
 * @param ages A list of integers representing ages.
 */
fun createTupleAndPrint(names: List<String>, ages: List<Int>) {
/**
 * In this exercise, you need to create a tuple by combining a list of names and a list of ages.
 * Then, you should print the tuple to the console.
 *
 * @param names A list of strings representing names.
 * @param ages A list of integers representing ages.
 */
fun createTupleAndPrint(names: List<String>, ages: List<Int>) {

    // Use the zip() function to iterate over the lists simultaneously and create a list of pairs
    val result = names.zip(ages)
    // Convert the list of pairs to a tuple by flattening it
    val tuple = result.flatMap { it.toList() }
    // Print the resulting tuple
    println(tuple)
}

// Example usage