jaydeep
answered Oct 5 '21 00:00
open(filename) is used to open file in Python.
open() method should have file name as argument.
open() method return file refrence which used to read or write to file.
read() function read the file content.read() function can be called by file refrence.
b] read() [/b] function close the file and release the file object from the memory.it's good to clean the resource.
fp=open('any file full name with extension with correct path here')
filecontent=fp.read()
fp.close()
print(filecontent)// do what you feel good with file content