读取文件步骤:
1.读取文件
2.对文件内容进行操作处理
3.关闭文件
# 打开文件
# with open的方式,默认处理完文件内容后,自动关闭文件
with open("F:/develop/UI自动化框架/test_case/data.text") as f:
while True:
# 读取文件
line = f.readline() #读取一行
if line:
print(line)
else:
break