Reputation: 694
I'm looking for a one line Scala equivalent of this Python snippet
a, b, c, d = map(int, raw_input().split(" "))
Can some body help?
Upvotes: 1
Views: 123
Reputation: 10671
val Array(a, b, c, d) = str.split(" ").map(_.toInt)
Upvotes: 6