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-18 14:44:36 +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]))