Python menulis file teks di baris berikutnya

file = open("sample.txt", "w")
file.write("Hello\n")
file.write("World\n")
file.close()
Unusual Unicorn