Sobes.tech
Junior — Senior

Finding a pair in a list by a given string key

livecode

Task condition

You need to get from the list, which contains pairs of "string‑number", the element whose string part is equal to "sa".

fun main() {
    val pairs = listOf("sm" to 1, "sn" to 2, "sb" to 3, "sa" to 4)
}