Python Programming 20. Write To a Text File

Publicado em: 21 Novembro 2022
no canal de: Computer Science Lessons
2,092
40

This is the 20th in a course of computer science video lessons introducing programming with Python. In this video lesson, you will learn how to create a Python program that can write data into a text file. This is important if your application needs to save data while the application is not in use; for example, you might be making a game that needs to save high scores in some kind of leader board. This lesson begins by reviewing the techniques for reading a text file that were covered in the previous lesson, including how to search a text file for a particular data item. You will then learn how to use the append parameter of the open command, which will open an existing text file so that new data can be added to it, or it will create a new text file if it does not already exist. You also will learn now to put line breaks in a text file while writing to it. In addition, you learn about the issues associated with opening a text file for both reading and writing from within the same Python program.

Chapters:
00:00 Review - Search a text file line by line
02:51 Write text to a text file
04:07 Line breaks in a text file
04:50 Reading and writing to the same text file


Nesta página do site você pode assistir ao vídeo on-line Python Programming 20. Write To a Text File duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Computer Science Lessons 21 Novembro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 2,092 vezes e gostou 40 espectadores. Boa visualização!