Commit 0badcc96 by BellCodeEditor

save project

parent 5ec53ebb
Showing with 8 additions and 0 deletions
#第一种方法
file1=open(r"c:\Users\chen\Documents\lesson13-1\sales_list.txt",'r',encoding='utf-8')
file1.close()
#第2种方法
with open(r"c:\Users\chen\Documents\lesson13-1\sales_list.txt",'r',encoding='utf-8') as file1:
a=file1.read()
\ 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