执行以下Python代码后,输出的结果是? ( )with open('test.txt', 'w') as f: f.write('Hello') with open('test.txt', 'a') as f: f.write('World') with open('test.txt', 'r') as f: print(f.read())
A. Hello
B. World
C. HelloWorld
D. WorldHello
正确答案:C
试卷来源:202512 CCF-GESP编程能力等级认证Python四级真题