Say I have a string = "Nobody will give me pancakes anymore"
I want to count each word in the string. So I do string.split() to get a list in order to get ['Nobody', 'will', 'give', 'me', 'pancakes', 'anymore'].
But when I want to know the length of 'Nobody' by inputing len(string[0]) it only gives me 1, because it thinks that the 0th element is just 'N' and not 'Nobody'.
What do I have to do to ensure I can find the length of the whole word, rather than that single element?
string.split()result in a new variable, and take the length of the first element of that.SyntaxError: can't assign to function call