Ali
06/29/2022, 11:43 AMmutableListOf(listOf(1,2,3,4,5), listOf(6,7,8,9,10))
I need this modified result but keeping original list as it is.
[[1,2], [6,7,8,9,10]]
Thomas Urbanitsch
06/29/2022, 2:59 PMTran Thang
06/30/2022, 7:05 AMval arr = mutableListOf(1, 2, 3, 4, 5)
val arr2 = listOf(6, 7, 8, 9, 10)
val arr4 = mutableListOf(arr.filterIndexed { index, _ -> index == 0 || index == 1 }, arr2)