There are two ways to create a text file in python. code example Example: open text file in python f=open("Diabetes.txt",'r') f.read()