/**
 * In this exercise, you need to implement a function that compares two tuples.
 * The function should return true if the tuples have the same number of elements
 * and all the elements at corresponding positions are equal. Otherwise, it should
 * return false.
 *
 * @param tuple1 A tuple containing elements of any data type.
 * @param tuple2 A tuple containing elements of any data type.
 * @return true if the tuples have the same number of elements and all elements at corresponding positions are equal, false otherwise.
 *
 * Example:
 * compareTuples(listOf('A', 10, 'B'), listOf('A', 10, 'B')) -> true
 * compareTuples(listOf('A', 10, 'B'), listOf('B', 10, 'A')) -> false
 */
fun compareTuples(tuple1: List<Any>, tuple2: List<Any>): Boolean {

    if (tuple1.size != tuple2.size) {
        return false
    } else {
        for (i in tuple1.indices) {
            if (tuple1[i] != tuple2[i]) {
                return false
            }
        }
        return true
    }
}
/**
 * In this exercise, you need to implement a function that compares two tuples.
 * The function should return true if the tuples have the same number of elements
 * and all the elements at corresponding positions are equal. Otherwise, it should
 * return false.
 *
 * @param tuple1 A tuple containing elements of any data type.
 * @param tuple2 A tuple containing elements of any data type.
 * @return true if the tuples have the same number of elements and all elements at corresponding positions are equal, false otherwise.
 *
 * Example:
 * compareTuples(listOf('A', 10, 'B'), listOf('A', 10, 'B')) -> true
 * compareTuples(listOf('A', 10, 'B'), listOf('B', 10, 'A')) -> false
 */
fun compareTuples(tuple1: List<Any>, tuple2: List<Any>): Boolean {
/**
 * In this exercise, you need to implement a function that compares two tuples.
 * The function should return true if the tuples have the same number of elements
 * and all the elements at corresponding positions are equal. Otherwise, it should
 * return false.
 *
 * @param tuple1 A tuple containing elements of any data type.
 * @param tuple2 A tuple containing elements of any data type.
 * @return true if the tuples have the same number of elements and all elements at corresponding positions are equal, false otherwise.
 *
 * Example:
 * compareTuples(listOf('A', 10, 'B'), listOf('A', 10, 'B')) -> true
 * compareTuples(listOf('A', 10, 'B'), listOf('B', 10, 'A')) -> false
 */
fun compareTuples(tuple1: List<Any>, tuple2: List<Any>): Boolean {

    if (tuple1.size != tuple2.size) {
        return false
    } else {
        for (i in tuple1.indices) {
            if (tuple1[i] != tuple2[i]) {
                return false
            }
        }
        return true
    }
}