将字串内容输出到文件

f = open("d:/py/3/1.txt", "w+")
f.write("This is my first project")
# for index in range(10):
# f.write(str(index) + "\n")
f.close()

猜你喜欢

转载自www.cnblogs.com/misswjr/p/9380022.html
今日推荐