Use shutil to copy the file content.
When you use 'for line in file', it uses the next method under the hood. And such method can load very big pieces of the binary file into the RAM memory. The shutil method will copy the file using smalls chunks, so the RAM memory is gonna be safe.
Showing
Please register or sign in to comment