所有文件操作,不为其编写代码
fileop的Python项目详细描述
简单的文件处理模块,减少了写入工作
fromfileopimportfiledata="saurabh londhe"file.create("data.txt")#creates a filefile.write("data.txt",data)#write content to the filefile.append("data.txt","\n Python lover")#appends data to the same files=file.read("data.txt")print(s)
输出:
saurabh londhe
Python lover