open file write unto it ands close it in pythoin code example
Example 1: open text file in python
f=open("Diabetes.txt",'r')
f.read()
Example 2: python write file
with open("file.txt", "w") as file:
for line in ["hello", "world"]:
file.write(line)