Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson12-4
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
c31b1a57
authored
Sep 18, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
0925b148
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
diy.py
ljy.py
diy.py
View file @
c31b1a57
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
filel
=
open
(
r'C:\Users\客家话吧\Desktop\李俊颐.txt'
,
'w'
,
encoding
=
'UTF-8'
)
filel
.
write
(
"我妈:99999"
)
filel
=
open
(
r'C:\Users\客家话吧\Desktop\李俊颐.txt'
,
'w'
,
encoding
=
'UTF-8'
)
#打开文件
filel
.
write
(
"我妈:99999"
)
#写入"我妈:99999"
filel
.
close
()
with
open
(
r'C:\Users\客家话吧\Desktop\李俊颐.txt'
,
'r'
,
encoding
=
'UTF-8'
)
as
wnjian
:
with
open
(
r'C:\Users\客家话吧\Desktop\李俊颐.txt'
,
'r'
,
encoding
=
'UTF-8'
)
as
wnjian
:
#写入文件
for
i
in
wnjian
:
i
=
i
.
replace
(
'我妈:99999'
,
'我妈:999999999999'
)
new_i
+=
i
new_i
+=
i
print
(
new_i
)
with
open
(
r'C:\Users\客家话吧\Desktop\李俊颐.txt'
,
'w'
,
encoding
=
'UTF-8'
)
as
wnjian
:
wenjian
.
write
(
new_i
)
...
...
ljy.py
0 → 100644
View file @
c31b1a57
with
open
(
r'C'
)
\ No newline at end of file
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