0

I can't read a big text file using this code, why?

The code below works fine with small text files, but once the text gets bigger It doesn't work. filename = 'big.txt' with open (filename) as f: re = f.read() print(re)

19th Feb 2021, 4:26 PM
King
1 Answer
+ 1
If you are running this code in SoloLearn, the "No Output" message also if time needed for program to output something Is more than runtime set in the server to prevent overloading. If you are running this code in local interpreter (such as official Python interpreter), you should wait; if you are forced to wait to long, error/exception is being raised, computer freezes or restarts, then file is really too big for interpreter, stack, disc or device.
19th Feb 2021, 4:39 PM
#0009e7 [get]
#0009e7 [get] - avatar