AI题库 · Python编程六级题库
题目分享 #6078
运行下面代码的正确结果是?
with open("myfile.txt", "w") as out_file:
out_file.write("This is my first Python program.")
with open("myfile.txt", "r") as in_file:
myfile = in_file.read()
print(myfile)其中myfile.txt文件内容如下: Hello World!
A
Hello World!
B
This is my first Python program.
C
Hello World!
This is my first Python program.
D
Hello World!This is my first Python program.
AI题库 · 编程考级与信奥赛真题库
查看答案 →
复制链接后可在微信、QQ、小红书等平台粘贴分享;答案与解析在题目页。