This is my solution resulting in an error. Returns 0
PS: I\'d still love a fix to my code :)
from collections import Counter import
string=str(input("Enter any sentence: ")) s=string.split() a=0 b=0 for i in s: a=len(i) b=a+b print(b)
It works perfectly without counting spaces of a string