RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

云南昆明网站维护公司

昆明网站建设、网站设计制作、网站运营维护常见知识介绍
自定义存储目录文件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://www.bdklh.com/article/jjgsdh.html