# 如何读写文本文件
s = '你好'
print(s.encode('utf8'))
print(s.encode('gbk'))
# b 代表byte
print(b'abc')
# wt t 是默认方式
f = open('py3.txt', 'wt', encoding='utf8')
f.write('你好,ijackey.com')
f.close()
f = open('py3.txt', 'rt', encoding='utf8')
s = f.read()
print(s)