Records and files
Store collections and work with files
Tuples, sets, and dictionaries provide different ways to organize data in Python. Tuples keep values in a fixed sequence, sets store distinct values, and dictionaries connect keys with values. Choose a collection according to how you need to store and access the data.
Files keep data available after a program finishes. This part also covers file paths, reading and writing data, and organizing files and folders.
Learning objectives
By the end of this part, you will be able to:
- create and use tuples and sets;
- access, update, and loop through dictionary entries;
- work with file paths and organize files and folders;
- read and write text, JSON, and CSV data.