from sys import argv
from os.path import exists
script, from_file, to_file = argv
out_file = open(to_file, 'w')
out_file.write(indata)
print out_file
print "Alright, all done."
input.close() # Dong file roi
out_file.close()
print indata
Như trong code này out_file.write(indata) không được tham chiếu thì sẽ là gc và bị xóa đi sau vài giây, nhưng sau khi kết thúc chương thì nó vẫn có thể viết được nội dung của indata?(Nếu là gc và bị xóa đi rồi sao vẫn có thể ghi được?)