It's my pleasure to write some code of program and make it usefull as simulation of file processing. In Python, there are many ways to open, read, and write file it is called by file processing.
I have been write some code as sample to you if you wanna learn algorithm of file processing. the description each files are below:
- read.py (simple program to read entire content of the file)
- read-line-by-line.py (simple program to read content of file line-by-line)
- read-lines-in-a-list.py (simple program to read content of file but stored in a list)
- write.py (simple program to write some text in an empty file)
- write-append-to-file.py (simple program to add some line of text in the file that has been filled before)
- main-read-write.py
- listofname.txt (as sample of list people)
- empty.txt (sample of empty file)
- example.txt (as sample for main program)