i need help understanding how to fix my code (But please no explicit answers, I really need to understand.)
I need to create a program (I'm using IDLE) that will count the number of characters in a given sentence WITHOUT counting spaces.
So far I have:
S = raw_input("Enter Sentence: ")
print "The number of characters in the sentence is %d" % (len(S))
But this does not subtract the spaces. I tried using S.split, but i'm not using it correctly, for instance:
S = raw_input("Enter Sentence: ")
S.strip()
print "The number of characters in the sentence is %d" % (len(S))
thanks for any help/advice