# Text Files

Text Files: Reading and Writing Text Files.

Updated: November 19, 2026

1. [Reading and Writing Text Files](https://www.ask-codey.com/lessons/python-files-reading-and-writing) (Apprentice): open() in a with block writes text to a file and reads it back, the mode says whether to write ("w"), add to the end ("a") or read ("r"), encoding="utf-8" keeps every letter intact, and a FileNotFoundError means the name or the folder is wrong.

Source: https://www.ask-codey.com/courses/python-in-depth/topics/python-text-files
