Commit 93d7c27f by BellCodeEditor

save project

parent 7210fdc1
Showing with 3 additions and 11 deletions
t = 'C:\\Users\\Administrator\\Desktop\\text0528.txt'
with open(t,'w',encoding='utf-8') as file1:
b = file1.write('同学们的捐赠明细:\n小兰:12本、\n小丽:11本、\n李文:9本、\n张伟:16本、\n小强:11本、\n李明:15本')
file1.close()
with open(t,'r',encoding='utf-8') as file1:
with open('C:\\Users\\Administrator\\Desktop\\text0528.txt','r',encoding='utf-8') as file1:
a = file1.read()
a = b.rep
print(a)
with open(t,'w',encoding='utf-8') as file1:
s = file1.write(a)
\ No newline at end of file
print(a)
\ 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