摘要: 1 #创建文件context='''hello world,hello china'''f=file("hello.txt",'w') #打开文件,若没有就创建吧f.write(context) #把字符串写入文件f.close() #关闭文件.释放资源####################### 阅读全文