Post

@Python_Dv Answer: A). Creates & writes file
The code opens a file named "demo.txt" in write mode ("w").
open("demo.txt", "w") creates the file if it doesn't exist, opens it for writing, and assigns the file object to the variable f. The "w" mode
English

@Python_Dv Correct answer: A) Creates & writes file
Explanation:
Opening a file with mode "w" creates the file if it doesn’t exist (or overwrites it if it does).
f.write("Hello") writes the text into demo.txt, and f.close() saves and closes the file.
English

@Python_Dv creates and writes the code openes demo.txt in write mode then writes Hello into it and closes it
English























