Commit 1bbcee6e by BellCodeEditor

save project

parent 7b4f2bbc
Showing with 34 additions and 3 deletions
a='第十层'
b=a.replace('十','八')
print(b)
#for i in a:
with open('C:\\Users\\Administrator\\Desktop\\真不错.txt','r',encoding='utf-8') as a:
#a.write('ssssss')
#i=a.read()
a.
print(i)
\ No newline at end of file
c=''
with open('C:\\Users\\Administrator\\Desktop\\真不错.txt','r',encoding='utf-8') as a:
for b in a:
if 'll' in b:
b=b.replace('ll','kk')
c+=b
with open('C:\\Users\\Administrator\\Desktop\\真不错.txt','w',encoding='utf-8') as a:
a.write(c)
c=''
with open('C:\\Users\\Administrator\\Desktop\\真不错.txt','r',encoding='utf-8') as a:
for b in a:
if 'll' in b:
b=b.replace('ll','kk')
#print(b)
c+=b
print(c)
\ No newline at end of file
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
with open(r'C:\Users\Administrator\Desktop\真不错.txt','a',encoding='utf-8')as a:
a.write('aaaa\n')
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