Kotlin Filternot

fun main() {
    val asha = Student(101, "Asha")
    val john = Student(102, "John")
    val afra = Student(103, "Afra")
    val kyle = Student(104, "Kyle")
    val studentList = listOf(asha, john, afra, kyle)
    val filteredList = studentList.filterNot { student -> 
                student.name.startsWith("K")
    }
    println(filteredList) 
}
data class Student(val id: Long, val name: String)
Smoggy Snail