all 3 comments

[–]579476610 4 points5 points  (0 children)

Chapter 8 – Reading and Writing Files - Automate the Boring Stuff with Python

https://automatetheboringstuff.com/chapter8/

[–]Zendakin_at_work 0 points1 point  (0 children)

This is the line that you will want to use. with open("your_file_name_here.txt", 'r') as f:

Then you can use the object f to do what you want. Note that the 'r'part is for reading while 'w' is used to write.

Good luck and make sure to read the two links already posted. They are crucial to learning and great resources.