← Previous Next →

Count the lower 'e' in the 'words' file

Created by Julien Palard

Instructions

Warning

You should work on this exercise with your own installation of Python, on your computer. Learn how for Mac OSX or Windows.

Create a script which opens a file called words.txt located in the same folder and print the number of occurences of the letter e in its content.

Advice

Remember :

>>> for i in "foo":
...     print(i)
...
f
o
o
>>>

Results