You have a list of words. Print a map with each word as a value and capitalize the first letter as a key.
Collection transformations
Capitalize the words
Report a typo
Sample Input 1:
john jane joe jill packSample Output 1:
{J=jill, P=pack}Write a program in Kotlin
fun main() {
val list = readln().split(" ")
// write your code here
val res =
println(res)
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.