course
Python: Text Input/Output Fundamentals
4 students
Course updated
11 September 2023
Included in the course
6 lessons (video or text)
Assistance in Discussions on the website
Access to other courses of the our platform
What you'll learn
- Proper file handling
- Read files and write data to them
- Use files as context managers
Description
In this course, we will study the basics of text input/output. You will learn about file descriptors and context managers. Finally, you will learn the basic techniques and tools for reading and writing data into a file. The basics of test I/O will help when working with files and the file system using different modes and context managers. This course is suitable for those who are still learning Python. To ease the learning process, it's a good idea to learn the basics of Python and the different types of collections: lists and dictionaries.
Course program
Estimated time: 2 hours
-
4
Line-by-line reading and writing
Learning to work with files line-by-line and iterate them while reading -
5
Context managers
Learning how to use context managers to work with files correctly and safely -
7
Additional resources
Some materials the Hexlet team have picked up. This will give you a more in-depth understanding of the topic