Concatenate all elements in a list into a string and return it

example:

12,10,8,9

output:-121089

 code:

def concatenate_list_data(list):
    result= ''
    for element in list:
        result += str(element)
    return result
 
print(concatenate_list_data([2, 11, 32, 24]))
output:-

2113224

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post