Commit 57f3cd84 by BellCodeEditor

save project

parent a9adc043
Showing with 6 additions and 2 deletions
...@@ -10,8 +10,12 @@ ...@@ -10,8 +10,12 @@
# a.close() # a.close()
# with open(r'C:\Users\pc\Desktop\bellcode\b.txt','a',encoding='utf-8') as a: # with open(r'C:\Users\pc\Desktop\bellcode\b.txt','a',encoding='utf-8') as a:
# a.write('asdfghj:1234567890\n') # a.write('asdfghj:1234567890\n')
n=''
with open(r'C:\Users\pc\Desktop\bellcode\b.txt','r',encoding='utf-8') as a: with open(r'C:\Users\pc\Desktop\bellcode\b.txt','r',encoding='utf-8') as a:
# g=a.read() # g=a.read()
for c in a: for c in a:
if 'asdfghj:1234567890' in c: if 'asdfghj:1234567890' in c:
print('yes') c=c.replace('asdfghj:1234567890','现场:123456')
\ No newline at end of file n+=c
with open(r'C:\Users\pc\Desktop\bellcode\b.txt','w',encoding='utf-8') as a:
a.write(n)
\ No newline at end of file
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