Python Programming 19. Read From a Text File

Publié le: 20 novembre 2022
sur la chaîne: Computer Science Lessons
2,240
59

This is the 19th in a course of computer science video lessons introducing programming with Python. In this video lesson, and the next one of the series, you will learn how to write Python programs that work with text files. This video covers reading data from a text file into a python program (the next video covers writing data into a text file). In this lesson you will learn how to open and close a read only text file. You will learn how to read the entire text file at once into a variable, you will learn how to read a specified number of characters from the text file into a variable, and you will learn how to read one line of text from a text file into a variable. You will also learn how to use a while loop to read a text file line by line, and how to use a for loop to do the same thing. In addition you will see how to search a text file for a particular piece of data.

Chapters:
00:00 Why do we need to work with text files?
00:58 Create a simple text file with Notepad
01:47 Read a whole text file at once
04:05 Read characters from a text file
06:34 Read a line from a text file
07:28 Read a text file with a while loop
08:40 Read a text file with a for loop
09:47 Search a text file


Sur cette page du site, vous pouvez voir la vidéo en ligne Python Programming 19. Read From a Text File durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Computer Science Lessons 20 novembre 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,240 fois et il a aimé 59 téléspectateurs. Bon visionnage!