Commit 2e87e299 by BellCodeEditor

save project

parent a6670298
Showing with 9 additions and 7 deletions
悟空 12 15 11 12 11 12 14 13 15 17
小贝 11 14 17 14 19 10 17 16 15 14
诺依 12 17 15 14 13 19 18 11 11 10
#file = open(r"C:\Users\no3\Documents\lesson12-1\sales_list.txt",'r',encoding='utf-8') #file = open(r"C:\Users\no3\Documents\lesson12-1\sales_list.txt",'r',encoding='utf-8')
with open(r"C:\Users\no3\Documents\lesson12-1\sales_list.txt",'r',encoding='utf-8')as file: with open(r'C:\Users\no3\Documents\lesson12-1\sales_list.txt','r',encoding='utf-8')as file:
a = file.readlines() a = file.readlines()
print(a)
for i in a: for i in a:
print(i,end=" ") data = i.split()
print(data[0])
print(data[1:])
\ No newline at end of file
悟空 12 15 11 12 11 12 14 13 15 17 21
小贝 11 14 17 14 19 10 17 16 15 14 20
诺依 12 17 15 14 13 19 18 11 11 10 25
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