Python File Handling: Create, Open, Append, Read, Write

Step 2)

Step 4) print contents

Here is the output

How to Read a File line by line

You can also read your .txt file line by line if your data is too big to read. This code will segregate your data in easy to ready mode