既能读也能写的模式叫读写混合模式(R+)
读写模式打是先读后写支持追加
f = open('兼职白领学生空间模特护士联系方式.txt',‘r+’, encoding='gbk')
data = f.read() #可读内容
print(data)
f.write(' black girl 河北 167 50 13542342233') #可以写
f.close()
还有一种模式叫写读混合模式(W+)(几乎是没有应用场景)
写读模式打开是先写后读不支持追加等于是创建模式打开