I want to make a function that takes a list which contains some words and prints only the first letter of each word in order to make one new word.
So my function is right here:
def word(x):
li = []
for w in x:
li.append(w[0])
return sum(li)
But unfortunately, it gives me the following error:
TypeError: unsupported operand type(s) for +: 'int' and 'str'
Can you please explain me why is this happening ?