编辑代码
Ruby代码
2.5.1
运行
text =
"1 2"
puts text.
split
(
"\n"
).
map
{|line| line.strip}.
join
(
","
)