O Level Exam : Practical Question
📝 HTML
🎨 CSS
⚡ Java Script
texts = [ "This is the first appended line.\n", "This is the second appended line.\n", "This is the third appended line.\n" ] with open("data.txt", "a") as file: file.writelines(texts) print("Text appended to file successfully.")
▶ Run Code
🖥 Output: