第14172题
执行给定Python代码后,空文本文件'a.txt'中的内容是什么?

文本文件'a.txt'初始为空,执行以下Python代码:

n = 1
f = open('a.txt', 'a')
while n <= 6:
    f.write(str(n))
    n += 1
f.close()
A

123456

B

6

C

D

1