
| └── dog_breeds.txt ← Accessing this file | ├── to/ ← Current working directory (cwd) ├── path/ ← Referencing this parent folder For this tutorial, you’ll only deal with. There are hundreds, if not thousands, of file extensions out there.

gif most likely conforms to the Graphics Interchange Format specification.

For example, a file that has an extension of. What this data represents depends on the format specification used, which is typically represented by an extension.

This data is organized in a specific format and can be anything as simple as a text file or as complicated as a program executable. Upon completion you will receive a score so you can track your learning progress over time:īefore we can go into how to work with files in Python, it’s important to understand what exactly a file is and how modern operating systems handle some of their aspects.Īt its core, a file is a contiguous set of bytes used to store data. Take the Quiz: Test your knowledge with our interactive “Reading and Writing Files in Python” quiz.
