I created a function which tells me how many letters a word contains and I assigned the variable " i " to " num_letters "
My problem is that now I want to subtract the number of letters of each word, obtained from my function, from " i " but it doesn't let me since " i " is an integer and 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)
I also tried using map, such as: i = i - map(function_of_letters, g1[0]) but when I run it it tells me " unsupported operand type(s) for -: 'int' and 'map' "
How could I convert the number of letters of each word into an integer so I can make the operation?
My problem is that now I want to subtract the number of letters of each word, obtained from my function, from " i " but it doesn't let me since " i " is an integer and 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)
I also tried using map, such as: i = i - map(function_of_letters, g1[0]) but when I run it it tells me " unsupported operand type(s) for -: 'int' and 'map' "
How could I convert the number of letters of each word into an integer so I can make the operation?