zip컬렉션 연산
두 리스트를 Pair 리스트로 합칩니다.
문법
listA.zip(listB)예제
아래 값을 입력하면 예제에 즉시 반영됩니다.
val→listOf→println→zip→one→two→three→val a = listOf(1, 2, 3)
val b = listOf("one", "two", "three")
println(a.zip(b)) // [(1, one), (2, two), (3, three)]