自定义存储目录文件txt,写入文字并输出已输入的文字

dirPath = raw_input("Input your dir path:\n")
write = raw_input("What do you want to write? Please input here:\n")
with open(dirPath+"testDitPath.txt", "w") as f:
    f.write(write)
with open(dirPath+"testDitPath.txt", "r") as r:
    text = r.readline()
print "This is your writed: \n", text

当前名称:自定义存储目录文件txt,写入文字并输出已输入的文字
文章位置:http://zjjierui.cn/article/jjgsdh.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款