运行程序后,不能在txt文件中输出以下内容的Python程序是? ( )姓名:性别:
A:with open("t.txt","w+") as t1: t1.write("姓名:n性别:")
B:a='姓名:n性别:' with open("t.txt","w") as t1: t1.write(a)
C:with open("t.txt","w") as t1: t1.write("姓名:") t1.write("性别:")
D:with open("t.txt","w") as t1: t1.write("姓名:") t1.write("n性别:")
正确答案:A
试卷来源:202603 青少年软件编程等级考试Python六级真题