Answers for "Write a Python program to concatenate all elements in a list into a string and return it."

28

Concatenate Item in list to strings

>>> sentence = ['this','is','a','sentence']
>>> '-'.join(sentence)
'this-is-a-sentence'
Posted by: Guest on April-11-2020
0

how to concate a string to all elements in a list in python

[s + mystring for s in mylist]
Posted by: Guest on February-17-2021

Code answers related to "Write a Python program to concatenate all elements in a list into a string and return it."

Python Answers by Framework

Browse Popular Code Answers by Language