... when I run it it tells me " unsupported operand type(s) for -: 'int' and 'map' "
`Map` returns its own object, an iterator — not a sequence, not a single value. The interpreter justifiably complains it can't subtract an iterator from an integer.
`Map` won't apply the function you specified until it is actually iterated. One way to do so would be to invoke the list constructor, such as:
You'd be getting a new sequence though, not a single numeric value as the integer subtraction requires.
I'm supposing the result from the function which tells me the letters in every word of a string is not an integer (I don't really know what it is)
You should investigate what type you're getting so to understand the error. The IDE's hints, debugging or printing the type might help:
You probably need to rewrite the function that tells you how many letters a word contains.
I am going to point out that a word, or string, is an immutable, ordered, sequence of characters ... so it has a length. You could perhaps count letters in a word with the built-in `len` function.