Opening and reading files are actually one of the easiest things to learn in Python. You need to learn 3 key things:
We need to use the Python command open() to open a file, and the open() command takes 2 arguments.
SO, when we open a file, we also need to store the command to open in a variable.

Now that we have the command to open the file saved under the variable file we can use dot notation to read the contents of the file with the function .readlines().
We save the read contents of the file in another variable. See below.
data = file.readlines()
Lastly, we need to close the file.
file.close()