How do I do this without string.count(), because it is listed as deprecated in Python v2.7.3 documentation?
string.count()
I am unable to find what I should use instea
sentence = str(input("Write a Sentence: ")) count = 0 for word in sentence: if word == " ": count = count + 1 print(count+1)