/**
 * This function takes a string containing information about an artist and returns a triple
 * with the artist's name, nationality, and number of albums released.
 *
 * @param artistInfo String containing artist information in the format "name|nationality|albums".
 * @return Triple with the artist's name, nationality, and number of albums released.
 *
 * Example:
 * createArtistData("Leonardo da Vinci|Italian|5") should return Triple("Leonardo da Vinci", "Italian", 5)
 */
fun createArtistData(artistInfo: String): Triple<String, String, Int> {

    // Splitting the string at each pipe character to extract artist's name, nationality, and albums
    val artistData = artistInfo.split("|")

    // Creating a triple from the extracted data
    return Triple(artistData[0], artistData[1], artistData[2].toInt())
}
/**
 * This function takes a string containing information about an artist and returns a triple
 * with the artist's name, nationality, and number of albums released.
 *
 * @param artistInfo String containing artist information in the format "name|nationality|albums".
 * @return Triple with the artist's name, nationality, and number of albums released.
 *
 * Example:
 * createArtistData("Leonardo da Vinci|Italian|5") should return Triple("Leonardo da Vinci", "Italian", 5)
 */
fun createArtistData(artistInfo: String): Triple<String, String, Int> {
/**
 * This function takes a string containing information about an artist and returns a triple
 * with the artist's name, nationality, and number of albums released.
 *
 * @param artistInfo String containing artist information in the format "name|nationality|albums".
 * @return Triple with the artist's name, nationality, and number of albums released.
 *
 * Example:
 * createArtistData("Leonardo da Vinci|Italian|5") should return Triple("Leonardo da Vinci", "Italian", 5)
 */
fun createArtistData(artistInfo: String): Triple<String, String, Int> {

    // Splitting the string at each pipe character to extract artist's name, nationality, and albums
    val artistData = artistInfo.split("|")

    // Creating a triple from the extracted data
    return Triple(artistData[0], artistData[1], artistData[2].toInt())
}