Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson12-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
0d0f5b78
authored
Dec 21, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
57f856ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
pp.py
去问人体与。py
pp.py
View file @
0d0f5b78
...
...
@@ -9,5 +9,7 @@ file.close()
file
=
open
(
r'C:\Users\makcoo\Desktop\test.txt'
,
'r'
,
encoding
=
'utf-8'
)
for
i
in
file
:
if
'国'
in
i
:
print
(
"所查找内容在文件里"
)
\ No newline at end of file
if
'国庆'
in
i
:
new
=
i
.
replace
(
'国庆'
,
'中秋'
)
new_data
=
new_data
+
new
print
(
new_data
)
\ No newline at end of file
去问人体与。py
0 → 100644
View file @
0d0f5b78
++ "b/\345\216\273\351\227\256\344\272\272\344\275\223\344\270\216\343\200\202py"
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