val str = "level"for (c in str) { println(c)}//带索引迭代for ((i, c) in str.withIndex()) { println("str[$i] = $c")}