Learn Python - File Handling | Reading and Writing Files

preview_player
Показать описание
This video is about working with files in Python. In this video, we see how we can create a new file, write a file and how to read a file.

This video starts with reading a file, but if file doesn't exists, the code migth throw an exception. We then go on to see write mode in Python open function to write a file. In this video, we write very simple text file. Then, we switch to append mode and add few more lines. This video also shows some of the methods for working with file objects in Python.

Finally, we see some of the methods for reading a file. This video also shows with expression which is more elegant way to open a file pointer in Python. With this expression, the developer doesn't need to take care of closing the file. Python will automatically close the file when the with block ends.

If you like our content, click on *SUBSCRIBE* button and click on Bell icon to receive latest and greatest updates of my video lessons.

Follow us on Facebook, Twitter, Instagram

Рекомендации по теме
welcome to shbcf.ru