# Turn the list into a literal string:
s = ['I', 'want', 4, 'apples', 'and', 18, 'bananas']
# will return: "['I', 'want', 4, 'apples', 'and', 18, 'bananas']"
print(str(s))
# Turn python list into a literal string:
python_array = ['I', 'want', 4, 'apples', 'and', 18, 'bananas']
mytext = str()
separator=" "
for arrayItem in python_array:
if (isinstance(arrayItem,str)):
mytext+=arrayItem
mytext+=separator
else:
mytext+=str(arrayItem)
mytext+=separator
print(mytext)
print(type(mytext))