나는 이렇게 학습한다/Algorithm & SQL

1029. Printing Array elements with Comma delimiters

daco2020 2022. 10. 29. 20:43
반응형

nput: Array of elements

["h","o","l","a"]

Output: String with comma delimited elements of the array in th same order.

"h,o,l,a"



solution:

def print_array(arr):
    return ','.join(map(str, arr))


반응형