Answers for "convert list<string> to array of string"

1

list to string

# Python program to convert a list 
# to string using list comprehension 

s = ['I', 'ate', 2, 'shake', 'and', 3, 'chocolates'] 

# using list comprehension 
listToStr = ' '.join([str(element) for element in s]) 

print(listToStr)
Posted by: Guest on May-31-2021
-1

list of string to string array in java

list.toArray(new String[0]);
Posted by: Guest on March-16-2021

Code answers related to "convert list<string> to array of string"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language