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
num_lines = sum(1 for line in open('filename.txt')) num_words = sum(1 for word in open('filename.txt').read().split()) num_chars = sum(len(word) for word in open('filename.txt').read().split())