Intermediate Python Tutorial #2 - Reading and Writing to Files in Python

preview_player
Показать описание
In this Python tutorial, we will learn how to deal with text files in Python using the built-in open function. You will understand how to use the most important modes: read, write and append.
That's not all! We will discuss about file parsing and touch important string methods used for that such as: strip( ) and split( ). Finally we wrap up with a parsing file exercise to practice the new concepts. After that video you will be confident to deal with text files which is a very important skill to have as a programmer.

Playlist: Intermediate Python Tutorials | Video #2

Timestamp:
00:00 - Summary of the video
00:17 - Types of files
00:43 - How to open a file
01:17 - File modes
02:15 - How to read data from a file
03:00 - with statement
04:10 - readlines( ) method
05:05 - String: strip( ) method
06:22 - How to iterate over a file line by lin
08:47 - How to write data to a file
11:43 - How to append data to a file
12:37 - Exercise: Parsing a text file
16:14 - Converting data types
17:00 - Next video announcement

Thumbnail:
Photo by Mario Ho on Unsplash
Рекомендации по теме
Комментарии
Автор

I can seat all day listening to you saying "Argentina is the first". Thank you!! Nice video

marcosdiiorio
Автор

Interesting video, how would you identify some specific word in your file and then recreate a new file changing only this word. (Keeping the indentation of the file).
Keep up the good work!

thalesmachado
visit shbcf.ru