文件 IO

# 写文件
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

posted @ 2019-12-01 15:58  Agoni丶  阅读(119)  评论(0)    收藏  举报