我有这个杂烩:
input = [
{ name: 'João dos Santos Neto',
cpf: '00011122233',
state: 'Rio de Janeiro',
value: '12345' },
{ name: 'Maria da Silva Nunes',
cpf: '99988877766',
state: 'São Paulo',
value: '98765' }
]
def solution(input)
# return a string
end
如何将此哈希转换为多行字符串,其中此哈希的每个值都成为字符串中的一行。
例子:
solution(input) == "João dos Santos Neto, 00011122233, Rio de Janeiro, 12345 \n
Maria da Silva Nunes, 99988877766, São Paulo, 98765"
1条答案
按热度按时间u5rb5r591#
我的一行: