파이썬에서 목록을 문자열로 변환하는 방법
list_of_num = [1, 2, 3, 4, 5]
# Covert list of integers to a string
full_str = ' '.join([str(elem) for elem in list_of_num])
print(full_str)
파이썬 문자열 목록
>>> L = [1,2,3]
>>> " ".join(str(x) for x in L)
'1 2 3'
목록을 문자열 파이썬으로 변환
# Python program to convert a list
# to string using list comprehension
s = ['I', 'want', 4, 'apples', 'and', 18, 'bananas']
# using list comprehension
listToStr = ' '.join([str(elem) for elem in s])
print(listToStr)
c#목록을 문자열로 변환
string combindedString = string.Join( ",", myList.ToArray() );
문자열 목록에서 c#빌드 문자열
string.Join(", ", stringCollection); // "Value1, Value2, Value3