Python Advanced (2): File Operations (Part 2)

In the previous section, we learned about the open function for opening a file, and the related parameters of the function, the file operation mode read-only, write-only, append and read and write at the same time, and the .write(), read(), .close( ). In this section, we will further study the file directory and the reading and writing of csv files.

1. File directory
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

2. CSV file reading and writing

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

** It is not easy to sort out the courseware. I think the content of the course is good when I pass by. Please help to like and bookmark it! Thanks♪(・ω・)ノ****If you need to reprint, please indicate the source.

Guess you like

Origin blog.csdn.net/zxxxlh123/article/details/114757570