Personal notes.
value = readlines.map(&:chomp)
Example) Apple banana
line = gets.split
p line
["Apple","banana"]
There is a space between data, you can specify a specific symbol etc. ・ If blank
puts array.join(' ')
Apple banana
·#in the case of
puts array.join('#')
Apple#banana
https://qiita.com/Hayate_0807/items/2e9705091b181a104621
Recommended Posts