Python reading lines in a txt file and writing to new txt file code example Example: open text file in python f=open("Diabetes.txt",'r') f.read()