list1 = ['1', '2', '3']
str1 = ''.join(list1)
‘’ contains the delimiter
Or if the list is of integers, convert the elements before joining them.
list1 = [1, 2, 3]
str1 = ''.join(str(e) for e in list1)
Convert string to list:
import string
str = 'abcde'
list = list(str)
网友评论