out=file.("output.txt", "w")
out.write("Hello, world: \n")
out.write("how are you")
out.close ()
file("output.txt").read()
Answers
Answered by
0
Hii good afternoon
Have anice day ahead
Answered by
0
Answer:
Hello, world
how are you
Explanation: Logically python will show an error as the file is open in write mode hence you will not be able to read, but here we can say a file will be created as output.txt with the contents given above and can be considered as an output
Similar questions