programming-examples/python/_Basics/Concatenate all elements in a list into a string.py

7 lines
186 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
def concatenate_list_data(list):
result= ''
for element in list:
result += str(element)
return result
print(concatenate_list_data([1, 5, 12, 2]))