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
It's very simple:
f = open('file.txt', 'rb') f.seek(0) # Move to the start of file print len(f.read())