Can someone give the answer for this?

How to split the elements(Integer) which is present in the list in Scala?

For example : List(1, 2, 3, 4, 5, 6) is there. I want as
1
2
3
4
5
6
like that.

scala 2.13.4> List(1, 2, 3, 4, 5, 6).foreach(println)
1
2
3
4
5
6
2 Likes

Thank you so much !!