Use python to read all the csv format data in the file in turn:
Then you can cycle through the list and read each file.
The output is:
For some file names beginning with numbers, each file may not be output in sequence, and you can use the sort () method:
Python file and directory operation method:
2. File operations
fp.read ([size]) #size is the length of the read, in bytes
fp.readline ([size]) #Read a line, if size is defined, it may return only part of a line
fp.readlines ([ size]) #Take each line of the file as a member of a list and return the list. In fact, its internal is realized by calling readline () in a loop. If the size parameter is provided, size is the total length of the read content, which means that it may be read only to a part of the file.
fp.write (str) #Write str to the file, write () does not add a newline character after str
fp.writelines (seq) #Write all the contents of seq to the file (multiple lines are written at once) Into). This function is also written faithfully, without adding anything after each line.
fp.close () #Close the file. Python will automatically close a file when it is not in use, but this feature is not guaranteed, it is best to develop the habit of closing. If a file is still operated after it is closed, ValueError
fp.flush () #Write the contents of the buffer to the hard disk
fp.fileno () #Return a long "file label"
fp.isatty () # Whether the file is a terminal device file (unix system)
fp.tell () #Return the current position of the file operation mark, with the beginning of the file as the origin
fp.next () #Return to the next line, and move the file operation mark to the next line. When a file is used in a statement such as for… in file, the next () function is called to traverse.
fp.seek (offset [, whence]) #Move the file operation marker to the position of offset. This offset is generally calculated relative to the beginning of the file and is generally a positive number. However, it is not necessary if the whenence parameter is provided, wherehence can be 0 to start from the beginning, and 1 to start from the current position. 2 indicates that the end of the file is used as the origin. Note that if the file is opened in a or a + mode, the file operation flag will automatically return to the end of the file each time a write operation is performed.
fp.truncate ([size]) #Cut the file to the specified size, the default is to cut to the position of the current file operation mark. If the size is larger than the size of the file, the file may not be changed according to the system, or the file may be filled to the corresponding size with 0, or it may be added with some random content.
3. Directory operation method