文本文件'a.txt'初始为空,执行以下Python代码:
n = 1 f = open('a.txt', 'a') while n <= 6: f.write(str(n)) n += 1 f.close()
123456
6
空
1