I want to read a huge file in my code. Is read() or readline() faster for this. How about the loop:
for line in fileHandle
Neither. Both of them will read the content into memory. In case of big files, iterating over the file object only loads one line of your file at a time and is perhaps a good way to deal with the contents of a huge file.