#####输出内容保存到文件 fp=open('C:/pythontest/stest.txt','w',encoding='utf-8') print('奋斗成就更好的你',file=fp) fp.close() ####第二种,使用文件读写操作### with open('C:/pythontest/stest1.txt','w',encoding='utf-8')as file: file.write('阿萨的距离开发环境撒地方和')
#####输出内容保存到文件 fp=open('C:/pythontest/stest.txt','w',encoding='utf-8') print('奋斗成就更好的你',file=fp) fp.close() ####第二种,使用文件读写操作### with open('C:/pythontest/stest1.txt','w',encoding='utf-8')as file: file.write('阿萨的距离开发环境撒地方和')