/**
 * This function takes two lists of colors as input and returns the common colors between them.
 *
 * @param artist1 A list of colors used by the first artist.
 * @param artist2 A list of colors used by the second artist.
 * @return A list of colors that are common to both artists.
 *
 * Example:
 * artist1 = ["red", "blue", "green", "yellow"]
 * artist2 = ["blue", "yellow", "purple"]
 * findCommonColors(artist1, artist2) // Output: ['blue', 'yellow']
 */
fun findCommonColors(artist1: List<String>, artist2: List<String>): List<String> {

    return artist1.filter { it in artist2 }
}
/**
 * This function takes two lists of colors as input and returns the common colors between them.
 *
 * @param artist1 A list of colors used by the first artist.
 * @param artist2 A list of colors used by the second artist.
 * @return A list of colors that are common to both artists.
 *
 * Example:
 * artist1 = ["red", "blue", "green", "yellow"]
 * artist2 = ["blue", "yellow", "purple"]
 * findCommonColors(artist1, artist2) // Output: ['blue', 'yellow']
 */
fun findCommonColors(artist1: List<String>, artist2: List<String>): List<String> {
/**
 * This function takes two lists of colors as input and returns the common colors between them.
 *
 * @param artist1 A list of colors used by the first artist.
 * @param artist2 A list of colors used by the second artist.
 * @return A list of colors that are common to both artists.
 *
 * Example:
 * artist1 = ["red", "blue", "green", "yellow"]
 * artist2 = ["blue", "yellow", "purple"]
 * findCommonColors(artist1, artist2) // Output: ['blue', 'yellow']
 */
fun findCommonColors(artist1: List<String>, artist2: List<String>): List<String> {

    return artist1.filter { it in artist2 }
}