11/28/2017, 2:20 PM
Reading a line with two integers in Python:
Copy code
a, b = list(map(int, input().split()))
Read a line with two integers in Kotlin:
Copy code
val (a, b) = readLine()!!.split(" ").map { it.toInt() }
Python version is definitely shorter, but with much, much higher number of WTF/minute when you are trying to understand what is going on and why you have to write it like that.
👍 1
😱 1