If you want to open a .txt file named: "log.txt" which is in the same directory as where you are working from:
Here, you can replace 'log' with any name you want. And 'r' specifies that you want to read from the file, whereas 'w' specifies that you want to write to a document.
# read() method returns a string variable
# readlines() returns a variable of list data type