Commit 143e6fcf by BellCodeEditor

save project

parent af406c84
Showing with 12 additions and 0 deletions
with open(r'c:\Users\huawei\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file:
a=file.readlines()
for i in a:
#把列表元素转换承一个个单独的字符串
new_i=i.split()
#把义卖款打印出来
print(new_i[1:])
#把义卖款的人名打印出来,不要数据
# print(new_i[0])
\ 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