400 028 6601

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

自定义存储目录文件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.bluegullmedia.com/article/jjgsdh.html

其他资讯

让你的专属顾问为你服务

0.0411s