'''
# R+ read and write
f = open("yesterday",'r+',encoding="utf-8")
print(f.readline())
print(f.tell())
f.write("---------first line-------------")
print(f.readlines())
'''
#w+ write and read
f = open("yesterday",'w+',encoding="utf-8")
print(f.tell())
f.write("---------first line-------------")
print(f.tell())
f.seek(10)
print(f.readline())
f.write("-------------------second line-------------")
f.write("-------------third line----------------")