Contact: aviboots(AT)netvision.net.il
39,948 questions
51,890 answers
573 users
fun main() { val list2D = listOf( listOf(5, 6, 1, 8), listOf(3, 2, 0, 4), listOf(9, 8, 7, 6) ) val list1D: IntArray = list2D.flatten().toIntArray() println(list1D.contentToString()) } /* run: [5, 6, 1, 8, 3, 2, 0, 4, 9, 8, 7, 6] */