Commit b58513fc by BellCodeEditor

save project

parent 8cc4891e
Showing with 17 additions and 12 deletions
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8')as file: filel=open(r'C:\Users\CM\Desktop\test.txt','w',encoding='utf-8')
a=file.readlines() filel.write('小兰:12本'/n)
filel.write('小丽:11本'/n)
filel.write('李雯:9本'/n)
filel.write('张伟:16本'/n)
filel.close()
for i in a:
data=i.split()
print(data[1:])
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8')as m: filel=open(r'C:\Users\CM\Desktop\test.txt','w',encoding='utf-8')
a=m.readlines() filel.write('小兰:12本'/n)
filel.write('小丽:11本'/n)
for i in a: filel.write('李雯:9本'/n)
data=i.split() filel.write('张伟:16本'/n)
print(data[1:]) filel.close()
\ No newline at end of file \ 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