/**
 * This exercise requires finding all the tuples in a given list.
 * A tuple is a sequence of elements, enclosed in parentheses, that can include any type of data.
 * The function should return a new list containing all the tuples found in the original list.
 *
 * @param aList A list containing various types of elements, including tuples.
 * @return A list containing all the tuples found in the input list.
 */
fun findTuplesInList(aList: List<Any>): List<Any> {

    // Initialize an empty list to store the tuples
    val tuplesList = mutableListOf<Any>()

    // Iterate through each element in the list
    for (element in aList) {
        // Check if the element is a tuple
        if (element is Pair<*, *>) {
            // Add the tuple to the new list
            tuplesList.add(element)
        }
    }

    // Return the final list containing only the tuples
    return tuplesList
}
/**
 * This exercise requires finding all the tuples in a given list.
 * A tuple is a sequence of elements, enclosed in parentheses, that can include any type of data.
 * The function should return a new list containing all the tuples found in the original list.
 *
 * @param aList A list containing various types of elements, including tuples.
 * @return A list containing all the tuples found in the input list.
 */
fun findTuplesInList(aList: List<Any>): List<Any> {
/**
 * This exercise requires finding all the tuples in a given list.
 * A tuple is a sequence of elements, enclosed in parentheses, that can include any type of data.
 * The function should return a new list containing all the tuples found in the original list.
 *
 * @param aList A list containing various types of elements, including tuples.
 * @return A list containing all the tuples found in the input list.
 */
fun findTuplesInList(aList: List<Any>): List<Any> {

    // Initialize an empty list to store the tuples
    val tuplesList = mutableListOf<Any>()

    // Iterate through each element in the list
    for (element in aList) {
        // Check if the element is a tuple
        if (element is Pair<*, *>) {
            // Add the tuple to the new list
            tuplesList.add(element)
        }
    }

    // Return the final list containing only the tuples
    return tuplesList
}