/**
 * This exercise focuses on copying lists and using the simple assignment operator.
 *
 * Given two lists, list1 and list2, your task is to create a function that copies the elements from list1 to list2.
 * You should use the simple assignment operator (=) to achieve this.
 *
 * @param list1 The source list from which elements are to be copied
 * @param list2 The destination list to which elements are to be copied
 */
fun copyList(list1: List<Int>, list2: MutableList<Int>) {

    // Checking if list1 is empty
    if (list1.isEmpty()) {
        return
    }

    // Simple assignment of list1 to list2
    list2.clear()
    list2.addAll(list1)

    // Printing list2 to verify the copy
    println(list2)
}
/**
 * This exercise focuses on copying lists and using the simple assignment operator.
 *
 * Given two lists, list1 and list2, your task is to create a function that copies the elements from list1 to list2.
 * You should use the simple assignment operator (=) to achieve this.
 *
 * @param list1 The source list from which elements are to be copied
 * @param list2 The destination list to which elements are to be copied
 */
fun copyList(list1: List<Int>, list2: MutableList<Int>) {
/**
 * This exercise focuses on copying lists and using the simple assignment operator.
 *
 * Given two lists, list1 and list2, your task is to create a function that copies the elements from list1 to list2.
 * You should use the simple assignment operator (=) to achieve this.
 *
 * @param list1 The source list from which elements are to be copied
 * @param list2 The destination list to which elements are to be copied
 */
fun copyList(list1: List<Int>, list2: MutableList<Int>) {

    // Checking if list1 is empty
    if (list1.isEmpty()) {
        return
    }

    // Simple assignment of list1 to list2
    list2.clear()
    list2.addAll(list1)

    // Printing list2 to verify the copy
    println(list2)
}