# 写入九九乘法表到文件
with open('cfb.txt', 'w') as f:
for i in range(1, 10):
for j in range(1, i+1):
product = i * j
f.write(f"{j} × {i} = {product}\t")
f.write('\n')
# 从文件中读取并逐行输出
with open('cfb.txt', 'r') as f:
lines = f.readlines()
for line in lines:
print(line.strip())