How to count the rows in 2D list with Scala

1 Answer

0 votes
object O {
    def main(args: Array[String]): Unit = {
        val lst = List(List(0, 5, 6, 1), List(8, 9, 2), List(7, 4))

        println(lst.length)
    }
}




/*
run:

3

*/

 



answered Sep 3, 2020 by avibootz

Related questions

...