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