how to write a file in python without .txt code example Example: open text file in python f=open("Diabetes.txt",'r') f.read()