Commit e61d7229 by BellCodeEditor

auto save

parent 6d261686
Showing with 8 additions and 15 deletions
li=['小','虎','语']
file=open('C:\\Users\\29018\\Desktop\\test.txt','w',encoding='utf-8')
file.writelines(li)
\ No newline at end of file
f=open(r'c:\Users\29018\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8')
a=f.readlines()
print(a)
f.close()
\ No newline at end of file
ww=open(r'c:\Users\29018\Documents\lesson13-1\sales_list.txt','w····',encoding='utf-8')
ww.write('悟空 122 34 67\n积极 23 90 89')
ww.close()
ww=open(r'c:\Users\29018\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8')
b=ww.readlines()
print(b)
for i in b:
print(i)
悟空 122 34 67
积极 23 90 89
\ No newline at end of file
open(r'c:\Users\29018\Documents\lesson13-1\sales_list.txt','r',encoding=utf-8)
\ 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