how to convert each element of list to string code example
Example 1: list to string python
>>> L = [1,2,3]
>>> " ".join(str(x) for x in L)
'1 2 3'
Example 2: convert every element in list to string python
[str(i) for i in mylst]
>>> L = [1,2,3]
>>> " ".join(str(x) for x in L)
'1 2 3'
[str(i) for i in mylst]