Answers for "how to make a list a string in python"

4

list to string python

List = ["ITEM1", "ITEM2", "ITEM3"]
string_version = "".join(List)

print(string_version)
Posted by: Guest on June-16-2020
4

list to string python

>>> L = [1,2,3]       
>>> " ".join(str(x) for x in L)
'1 2 3'
Posted by: Guest on May-11-2020
2

how to make a list string in python

n = ["Hello"," I'm " , "12" , " Years Old "] # Our list
String = "" # Our string
for x in n :
    String += x
    
print(String) #Prints it
Posted by: Guest on March-05-2021
0

python3 create list from string

input = ['word1, 23, 12','word2, 10, 19','word3, 11, 15']
output = []
for item in input:
    items = item.split(',')
    output.append([items[0], int(items[1]), int(items[2])])
Posted by: Guest on September-16-2020

Code answers related to "how to make a list a string in python"

Python Answers by Framework

Browse Popular Code Answers by Language