How to read a large file using Python
In my python code i am using file open method with readlines() function to read the content from a txt file.
The code snippet works fine.
However it is observed that at times, when the size of the file pass beyond 100 MB, the program gets crash and abnormally termination.
Is there any other reliable method to read the contents from a large file using python.
Below is the sample code, i am using currently:
filehandle = open("file.txt", "r") print(filehandle.readlines())