Q:

convert list of int to string python

test_list = list(map(int,test_list))
9
# Python3 program to convert a list 
# of integers into a single integer 
def convert(list): 
      
    # Converting integer list to string list 
    s = [str(i) for i in list] 
      
    # Join list items using join() 
    res = int("".join(s)) 
      
    return(res) 
  
# Driver code 
list = [1, 2, 3] 
print(convert(list)) 
2
# Python program to convert a list 
# to string using list comprehension 
   
s = ['I', 'want', 4, 'apples', 'and', 18, 'bananas'] 
  
# using list comprehension 
listToStr = ' '.join([str(elem) for elem in s]) 
  
print(listToStr)  
2
integers = [1, 2, 3, 4]
stringed = ''.join(map(str,new))
# stringed = "1234"
1
my_list = ["Hello", 8, "World"]
string = " ".join(my_list)
print(string)
"""
output
Hello 8 World
"""
1
a = [1, 2, 3]   
map(str, a)  
['1', '2', '3']
1

New to Communities?

Join the community