Excellent! You’re a pro.
Finally, we want to know how to read from our
output.txt file. As you might expect, we do this with the
read() function, like so:
Declare a variable,
my_file, and set it equal to the file object returned by calling
open() with both
my_file, like the example above.
Make sure to
.close() your file when you’re done with it! All kinds of doom will happen if you don’t.