using-len-for-text-but-discarding-spaces-in-the-count

>>> full_name = "John DOE"
>>> len(full_name) - full_name.count(' ')
7

Here is what the above code is Doing:
1. We create a variable full_name and assign it the string “John DOE”.
2. We use the len() function to get the length of the string.
3. We use the count() function to count the number of spaces in the string.
4. We subtract the number of spaces from the length of the string.