Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert list to string python

# 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)  
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #list #string #python
ADD COMMENT
Topic
Name
1+6 =