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