1# Python program to convert a list
2# to string using list comprehension
3
4s = ['I', 'want', 4, 'apples', 'and', 18, 'bananas']
5
6# using list comprehension
7listToStr = ' '.join([str(elem) for elem in s])
8
9print(listToStr)
1list_of_num = [1, 2, 3, 4, 5]
2# Covert list of integers to a string
3full_str = ' '.join([str(elem) for elem in list_of_num])
4print(full_str)