Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

bellcode / lesson13-4

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • lesson13-4
  • c.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · e3d26355
    BellCodeEditor committed 3 years ago
    e3d26355
c.py 276 Bytes
Edit
1 2 3 4 5 6 7 8 9 10
with open(r"c:\Users\肖慧\Desktop\sales_list.txt","r",encoding="utf-8")as file:
    a=fils.readlines()
for i in a:
    data=i.split()
    name=data[0]
    ym=data[1:]
    sum=0
    for k in ym:
        sum=sum+str(k)
    print(name+"总共捐款了"+str(sum)+"元")