open file and read contents python code example
Example 1: open text file in python
f=open("Diabetes.txt",'r')
f.read()
Example 2: python read entire file
with open('Path/to/file', 'r') as content_file:
content = content_file.read()
f=open("Diabetes.txt",'r')
f.read()
with open('Path/to/file', 'r') as content_file:
content = content_file.read()