Napisz plik YAML bez usunięcia treści

f = open('file_dir', 'a') #'a' means append  
f.write(variable)
Famous Flatworm