Skip to main content
1 byte shorter. PS added.
Source Link

Scala, 3635 bytes

Console.readLine.map(_+" ") mkString

Example:

scala> Console.readLine.map(_+" ") mkString
res1: String = "H e l l o   S c a l a ! "

PS. A function would be slightly shorter (32 bytes):

(s:String)=>s.map(_+" ")mkString

Scala, 36 bytes

Console.readLine.map(_+" ") mkString

Example:

scala> Console.readLine.map(_+" ") mkString
res1: String = "H e l l o   S c a l a ! "

Scala, 35 bytes

Console.readLine.map(_+" ")mkString

Example:

scala> Console.readLine.map(_+" ")mkString
res1: String = "H e l l o   S c a l a ! "

PS. A function would be slightly shorter (32 bytes):

(s:String)=>s.map(_+" ")mkString
Source Link

Scala, 36 bytes

Console.readLine.map(_+" ") mkString

Example:

scala> Console.readLine.map(_+" ") mkString
res1: String = "H e l l o   S c a l a ! "