with open ("ab.txt","r") as m: #for i in m:# # print i print m.readline()+"yes"# 不论是句柄readline,句柄readlines,for 遍历句柄,都包含换行符。 print m.readline() # #print m.readlines()
with open ("ab.txt","r") as m: #for i in m:# # print i print m.readline()+"yes"# 不论是句柄readline,句柄readlines,for 遍历句柄,都包含换行符。 print m.readline() # #print m.readlines()
原文:https://www.cnblogs.com/koujiaodahan/p/8127569.html