Save files on the fly


I have a big list call abc which I will keep appending tensor to it. The problem is that if I keep processing my list, and then save it at the end, it is likely to run out of memory. How do I keep appending my data to a save file?

for i in range(10000000):
    #how do I save the abc on the fly?