Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson13_2
This project
Loading...
Sign in
Toggle navigation
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
599f4530
authored
Jul 10, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
7b63badb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
5 deletions
diy.py
j.txt
diy.py
View file @
599f4530
c
=
0
with
open
(
r'C:\Users\Administrator\Documents\lesson13_2\sales_list.txt'
,
'r'
,
encoding
=
'utf-8'
)
as
file
:
a
=
file
.
readlines
()
for
i
in
a
:
d
=
[]
for
i
in
a
:
b
=
i
.
split
()
c
=
0
for
n
in
b
[
1
:]:
c
+=
int
(
n
)
print
(
b
[
0
]
,
c
)
e
=
b
[
0
]
+
str
(
c
)
+
'
\n
'
c
=
0
d
.
append
(
e
)
with
open
(
r'C:\Users\Administrator\Documents\lesson13_2\j.txt'
,
'a'
,
encoding
=
'utf-8'
)
as
file
:
file
.
writelines
(
d
)
\ No newline at end of file
j.txt
0 → 100644
View file @
599f4530
悟空348
诺依380
小贝182
李丽201
宋扬107
王明245
李强164
孙小白222
苏琪137
刘若若147
刘阳226
王胜男123
王娇131
悟空348
诺依380
小贝182
李丽201
宋扬107
王明245
李强164
孙小白222
苏琪137
刘若若147
刘阳226
王胜男123
王娇131
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment