Commit 012dd88f by BellCodeEditor

save project

parent b2f3eaf6
Showing with 9 additions and 8 deletions
filel=open('C:\\Users\\Administrator\\Desktop\\test.txt','w',encoding='utf-8')
filel.write("小民:12本")
filel.write("小文:12本")
filel.write("小明:12本")
filel.write("小兰:12本")
filel.close
\ No newline at end of file
with open('C:\\Users\\Administrator\\Desktop\\test.txt','w',encoding='utf-8') as filel:
filel.write('小明:1本\n')
filel.write('小王:10本\n')
filel.write('小文:15本\n')
filel.write('小兰:17本\n')
filel=open('C:\\Users\\Administrator\\Desktop\\test.txt','a',encoding='utf-8')
filel.write('小篮:11本\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