/**
 * Given two lists 'names' and 'articles', this function performs various operations on the lists.
 *
 * @param names A list of names
 * @param articles A list of articles
 * @return The modified list containing the concatenated tuples and repeated elements
 *
 * Instructions:
 * 1. Initialize an empty list called 'result'.
 * 2. Iterate through the 'names' list using a for loop.
 * 3. Inside the loop, create a tuple by combining each name with all the articles. The name should be the first element of the tuple, followed by each article.
 * 4. Append the tuple to the 'result' list.
 * 5. Return the 'result' list.
 *
 * Example:
 * names = ["John", "Alice"]
 * articles = ["Sports", "Politics"]
 * Output: [('John', 'Sports'), ('John', 'Politics'), ('Alice', 'Sports'), ('Alice', 'Politics')]
 */
fun listOperations(names: List<String>, articles: List<String>): List<Pair<String, String>> {

    val result = mutableListOf<Pair<String, String>>()
    for (name in names) {
        for (article in articles) {
            result.add(Pair(name, article))
        }
    }
    return result
}
/**
 * Given two lists 'names' and 'articles', this function performs various operations on the lists.
 *
 * @param names A list of names
 * @param articles A list of articles
 * @return The modified list containing the concatenated tuples and repeated elements
 *
 * Instructions:
 * 1. Initialize an empty list called 'result'.
 * 2. Iterate through the 'names' list using a for loop.
 * 3. Inside the loop, create a tuple by combining each name with all the articles. The name should be the first element of the tuple, followed by each article.
 * 4. Append the tuple to the 'result' list.
 * 5. Return the 'result' list.
 *
 * Example:
 * names = ["John", "Alice"]
 * articles = ["Sports", "Politics"]
 * Output: [('John', 'Sports'), ('John', 'Politics'), ('Alice', 'Sports'), ('Alice', 'Politics')]
 */
fun listOperations(names: List<String>, articles: List<String>): List<Pair<String, String>> {
/**
 * Given two lists 'names' and 'articles', this function performs various operations on the lists.
 *
 * @param names A list of names
 * @param articles A list of articles
 * @return The modified list containing the concatenated tuples and repeated elements
 *
 * Instructions:
 * 1. Initialize an empty list called 'result'.
 * 2. Iterate through the 'names' list using a for loop.
 * 3. Inside the loop, create a tuple by combining each name with all the articles. The name should be the first element of the tuple, followed by each article.
 * 4. Append the tuple to the 'result' list.
 * 5. Return the 'result' list.
 *
 * Example:
 * names = ["John", "Alice"]
 * articles = ["Sports", "Politics"]
 * Output: [('John', 'Sports'), ('John', 'Politics'), ('Alice', 'Sports'), ('Alice', 'Politics')]
 */
fun listOperations(names: List<String>, articles: List<String>): List<Pair<String, String>> {

    val result = mutableListOf<Pair<String, String>>()
    for (name in names) {
        for (article in articles) {
            result.add(Pair(name, article))
        }
    }
    return result
}