Skip to content

Glossary: Python Basics

Mode

Also written: file mode, "w", "a", "r"

The choice in `open()` of what you want to do with a file: `"w"` writes and empties it, `"a"` appends to the end, and `"r"` reads, which is the default.

Where the book teaches it