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

bellcode / lesson12-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 c89b2bc5 authored 4 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent a74a2b08
Hide whitespace changes
Inline Side-by-side
Showing with 8 additions and 7 deletions
  • diy.py
diy.py
View file @ c89b2bc5
...@@ -3,11 +3,13 @@ ...@@ -3,11 +3,13 @@
# for i in range(999):r'C:\Users\Administrator\Desktop\0\pp.txt','w',encoding='utf-8') # for i in range(999):r'C:\Users\Administrator\Desktop\0\pp.txt','w',encoding='utf-8')
# kkk.write("猪12本") # kkk.write("猪12本")
# kkk.close() # kkk.close()
# with open(r'C:\Users\Administrator\Desktop\0\pp.txt','w',encoding='utf-8') as kkk: with open(r'C:\Users\Administrator\Desktop\0\pp.txt','w',encoding='utf-8') as kkk:
# for i in range(999): for i in range(1):
# kkk.write("猪12本") kkk.write("猪12本\n")
new_data=""
with open(r'C:\Users\Administrator\Desktop\0\pp.txt','r',encoding='utf-8') as pp: with open(r'C:\Users\Administrator\Desktop\0\pp.txt','r',encoding='utf-8') as pp:
for i in pp: for i in pp:
if '猪12本'in i: if '猪12本' in i:
print("有") print("有")
\ No newline at end of file i.replace('猪12本','猪13本')
new_data+= i
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