自定义存储目录文件txt,写入文字并输出已输入的文字-成都快上网建站

自定义存储目录文件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://kswjz.com/article/jjgsdh.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流