fun main() { val list = listOf("Java", "Kotlin", "Python") for (element in list) { println(element) } for ((index, value) in list.withIndex()) { println("Elmenet at $index is $value") } /* * Elmenet at 0 is Java Elmenet at 1 is Kotlin Elmenet at 2 is Python */ }