Commit 6b6ce02a by BellCodeEditor

save project

parent b58513fc
Showing with 6 additions and 19 deletions
with open(r'c:\Users\Administrator\Desktop\sales_list.txt','r',encoding='utf-8') as file:
a=file.readlines()
# print(a)
for i in a:
print(i)
\ 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()
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