O Level Exam : Practical Question
📝 HTML
🎨 CSS
⚡ Java Script
lines = [ "This is the first line.\n", "This is the second line.\n", "This is the third line.\n"] fp=open("data.txt", "w") fp.writelines(lines) fp.close() print("Data written to data.txt successfully.")
▶ Run Code
🖥 Output: