/**
 * Given a list of tuples containing economic data and a value to compare with,
 * determine the tuples that have at least one element equal to the given value.
 * Return a list with indexes of those tuples.
 *
 * @param economicsData a list of tuples containing economic data.
 * @param value a value to compare with the elements of the tuples.
 * @return a list containing indexes of tuples that have at least one element equal to the given value.
 */
fun compareTuples(economicsData: List<List<Any>>, value: Any): List<Int> {

    val indexes = mutableListOf<Int>()

    for ((index, dataTuple) in economicsData.withIndex()) {
        var flag = false

        if (value in dataTuple) {
            flag = true
        }

        if (flag) {
            indexes.add(index)
        }
    }

    return indexes
}
/**
 * Given a list of tuples containing economic data and a value to compare with,
 * determine the tuples that have at least one element equal to the given value.
 * Return a list with indexes of those tuples.
 *
 * @param economicsData a list of tuples containing economic data.
 * @param value a value to compare with the elements of the tuples.
 * @return a list containing indexes of tuples that have at least one element equal to the given value.
 */
fun compareTuples(economicsData: List<List<Any>>, value: Any): List<Int> {
/**
 * Given a list of tuples containing economic data and a value to compare with,
 * determine the tuples that have at least one element equal to the given value.
 * Return a list with indexes of those tuples.
 *
 * @param economicsData a list of tuples containing economic data.
 * @param value a value to compare with the elements of the tuples.
 * @return a list containing indexes of tuples that have at least one element equal to the given value.
 */
fun compareTuples(economicsData: List<List<Any>>, value: Any): List<Int> {

    val indexes = mutableListOf<Int>()

    for ((index, dataTuple) in economicsData.withIndex()) {
        var flag = false

        if (value in dataTuple) {
            flag = true
        }

        if (flag) {
            indexes.add(index)
        }
    }

    return indexes
}