Convert comma-separated String into List

Convert comma-separated String into List

fun main(args : Array<String>)  {
    val input: String = "Kotlin Tutorial, Java Tutorial, Flutter Tutorial, Android Tutorial"

    println("=== String into List ===")
    var result: List<String> = input.split(",").map { it.trim() }

    result.forEach { println(it) }
}

/*
=== String into List ===
Kotlin Tutorial
Java Tutorial
Flutter Tutorial
Android Tutorial
*/