Last active
August 19, 2020 11:29
-
-
Save zion830/b8fc2a89c3ffa4e1968203f0aefb9568 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
while (true) { | |
val r = readLine()?.replace(",", "','") | |
var result = "[" | |
result += r?.split(" ")?.joinToString("") {"{'$it'}, "} | |
result = result.dropLast(2) + "]" | |
println(result.replace("','", "', '")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment