# 写文件
with open("byh.txt","wt") as out_flie:
out_flie.write("121431\n414")
with open("byh.txt","rt") as in_file:
text = in_file.read()
print(text)
输出结果:
121431
414
# 写文件
with open("byh.txt","wt") as out_flie:
out_flie.write("121431\n414")
with open("byh.txt","rt") as in_file:
text = in_file.read()
print(text)
输出结果:
121431
414