2 ms·
There's also: while data := fh.read(131072): # do stuff which is a lot nicer than: while True: data = fh.read() if not data: break # do s
by Dagger2 4y ago
There's also:
while data := fh.read(131072):
# do stuff
which is a lot nicer than:
while True:
data = fh.read()
if not data: break
# do stuff