# 读写模式 utf-8 正常
# f = open('老人与海','r+',encoding='utf-8')
# print(f.read())
# f.write("a")
# f.close()
# 写读模式 utf-8 写进去的东西会覆盖之前的字符,读出来的就是覆盖之后剩余的字符
# f = open('老人与海','r+',encoding='utf-8')
# f.write("aaaaa")
# print(f.read())
# f.close()
# 读写模式 utf-8 正常
# f = open('老人与海','r+b')
# print(f.read())
# f.write("a".encode('gbk'))
# f.close()
# 追加写模式 utf-8 正常
# f = open('老人与海','a+',encoding='utf-8')
# f.write("AAAA")
# f.seek(0)
# print(f.read())
# f.close()