Exercise 10: Read file

In Python you reading files is part of the standard library. ┬áTo read files, you can use the readlines() function. This will read a file line by line and store…