Commit 310a125c by BellCodeEditor

auto save

parent ce232609
Showing with 18 additions and 5 deletions
......@@ -9,6 +9,4 @@ colors=["red","orange","yellow","green"]
for i in range(1,300):
pen.pencolor(colors[i%4])
pen.forward(i)
pen.right(91)
pen.hideturtle()
turtle.done()
pen.right(91)
\ No newline at end of file
file=open(r'C:\Users\makcoo\Desktop\新建 文本文档.txt','w',encoding='utf-8')
file.write('国庆节快乐')
file.close()
\ No newline at end of file
file.close()
file=open(r'C:\Users\makcoo\Desktop\新建 文本文档.txt','r',encoding='utf-8')
w=file.read()
print(w)
file.close()
new_data=""
file=open(r'C:\Users\makcoo\Desktop\新建 文本文档.txt','r',encoding='utf-8')
for i in file:
if '国庆' in i:
new=i.replace('国庆','中秋')
new_data=new_data+new
print(new)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment