python print line in text file code example
Example 1: print file line by line python
with open('yourfile.txt','r') as f:
lines = f.readlines()
f.close()
Example 2: how to print a line in python
print("Hellow world!")
with open('yourfile.txt','r') as f:
lines = f.readlines()
f.close()
print("Hellow world!")