python print read txt file code example
Example 1: python open and reacd file
with open('yourfile.txt','r') as f:
lines = f.readlines()
f.close()
Example 2: how to open a text file in python
f = open("demofile2.txt", "a")
f.write("Now the file has more content!")
f.close()