Commit 7c58f440 by BellCodeEditor

save project

parent 6d47e353
Showing with 25 additions and 0 deletions
file=open("C:\Users\makcoo\Desktop\新建 文本文档.txt",'r',encoding='utf-8')
file.write('悟空\n')
file.close()
with open("C:\Users\makcoo\Desktop\新建 文本文档.txt",'w',encoding='utf-8') as file:
file.write('悟空\n')
file=open("C:\Users\makcoo\Desktop\新建 文本文档.txt",'r',encoding='utf-8')
a=file.read()
print(a)
file.close()
file=open("C:\Users\makcoo\Desktop\新建 文本文档.txt",'r',encoding='utf-8')
for i in file:
if '悟空' in i
print()
\ No newline at end of file
file=open("C:\Users\makcoo\Desktop\新建 文本文档.txt",'w',encoding='utf-8')
file.write('悟空\n')
file.close()
with open("C:\Users\makcoo\Desktop\新建 文本文档.txt",'w',encoding='utf-8') as file:
file.write('悟空\n')
\ No newline at end of file
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