I have a list and string:
fruits = [\'banana\', \'apple\', \'plum\'] mystr = \'i like the following fruits: \'
How can I concatenate them s
You can use str.join.
result = "i like the following fruits: "+', '.join(fruits)
(assuming fruits only contains strings). If fruits contains a non-string, you can convert it easily by creating a generator expression on the fly:
fruits
', '.join(str(f) for f in fruits)