- Edited
I'm not into objective-C, but if i was i would write a code that only counts spaces and separation signs.
I can write a python code.
"Soit l'expression", "How are you mate?" let s be the number of spaces, and n the number of words, n=s+1, it is noticeable. So that my code in Python2 will be:
I can write a python code.
"Soit l'expression", "How are you mate?" let s be the number of spaces, and n the number of words, n=s+1, it is noticeable. So that my code in Python2 will be:
expression = raw_input("Enter the expression: ")
i = map(str,list(expression))
def words(list):
s=list.count(" ")
return s+1
print words(i)
or
from urllib2 import *
expression = read("%file%path%")
i = map(str,list(expression))
def words(list):
s=list.count(" ")
return s+1
print words(i)