1、向txt写数据 file = open('cookie.txt','w',encoding='utf-8') #写入时,赋予的权限为w file.write('q34') file.close() 2、读取tx