Answers for "how to change from a list to string"

5

python list to string

mystring = 'hello, world'

mylist = string1.split(', ') #output => ['hello', 'world']

myjoin1 = ', '.join(mylist) #output => 'hello, world'
myjoin2 = ' '.join(mylist) #output => 'hello world'
myjoin3 = ','.join(mylist) #output => 'hello,world'
Posted by: Guest on May-08-2020
0

how to convert a list to a string in python

array = []
STR = ''
for i in array:
    STR = STR+i
Posted by: Guest on May-24-2020

Code answers related to "how to change from a list to string"

Python Answers by Framework

Browse Popular Code Answers by Language