Here is the question:
I have a file with these words:
hey how are you I am fine and you Yes I am fine
And it is asked to find the numbe
Here is the code:
fp = open(fname, 'r+').read() chars = fp.decode('utf8') print len(chars)
Check the output. I just tested it.