Write statement buffering

I was addicted to the Write statement, so make a note

f=open('hoge.txt'.'w')

LOOP = True
While LOOP:
    f.write('aaaaa\n')
if satisfied:
        LOOP=False

In that case, only 8192 byte files can be created, so

f=open('hoge.txt'.'w',buffering=1)

If you write one line at a time, you can overcome the 8192 wall.

Recommended Posts

Write statement buffering
return statement
while statement
How to write a ShellScript Bash for statement
How to write a ShellScript bash case statement