you want to know the number of terms ???
for example :-
s = python is a script language
then it should return 5
for that you can use this code
print len(s.split(' '))
where s.split(' ') will proivde you list (['python', 'is', 'a', 'script', 'language'])
and len(s.split(' ')) will return the number of terms in s (5)
try it it may help you
thanks for reading my reply
for example :-
s = python is a script language
then it should return 5
for that you can use this code
print len(s.split(' '))
where s.split(' ') will proivde you list (['python', 'is', 'a', 'script', 'language'])
and len(s.split(' ')) will return the number of terms in s (5)
try it it may help you
thanks for reading my reply