Answers for "list item to a string"

2

convert all items in list to string python

mylist = [str(i) for i in mylist]
Posted by: Guest on January-18-2021
6

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

Code answers related to "list item to a string"

Python Answers by Framework

Browse Popular Code Answers by Language