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
Commit 5ed5196a authored 3 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 43a7194f c20886l976p219a10078/wx150313
Hide whitespace changes
Inline Side-by-side
Showing with 7 additions and 3 deletions
  • diy.py
diy.py
View file @ 5ed5196a
with open('c:\\Users\\EDZ\\Desktop\\a.txt','r',encoding='utf-8') as w:
a=w.readlines()
o=[]
for i in a:
c=i.split()
s=0
for l in c[1:]:
s=s+int(l)
r=c[0]+str(s)
print(r)
\ No newline at end of file
r=c[0]+str(s)+'\n'
o.append(r)
with open('c:\\Users\\EDZ\\Desktop\\a.txt','w',encoding='utf-8') as w:
w.writelines(o)
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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