To create a list of empty lists in Kotlin, you can initialize a List of Lists with empty List elements.
In this example,
emptyList
to hold empty Lists.fun main() {
val emptyList = listOf(emptyList<String>(), emptyList(), emptyList())
println(emptyList)
}
[[], [], []]
In this tutorial, we learned How to create a List of Empty Lists in Kotlin language with well detailed examples.