I need to do: Write a function called concat_list
that accepts a list of strings as an argument and returns a string made up of all elements in the list concatenated together in order. For example, if the argument is ['one', 'two', 'three']
, the return value would be 'onetwothree'
.
When I enter my code:
def concat_list(strings): #idk if a list for a function has to be []
count = ' '
for i in strings:
count +=1
return count
I get:
TypeError: cannot concatenate 'str' and 'int' objects
on line 4. However I cannot think of another way to do this, what am I doing wrong and how do I fix it?