Commit 3c78d8e3 by BellCodeEditor

save project

parent 49a02140
Showing with 28 additions and 8 deletions
f=open(r'C:\Users\Administrator\Desktop\t.txt','w',encoding='utf-8')
f.write('小兰:12本\n小丽:11本\n李文:9本\n张伟:16\n')
f=open(r'C:\Users\Administrator\Desktop\t.txt','r',encoding='utf-8')
with open(r'C:\Users\Administrator\Desktop\t.txt','w',encoding='utf-8') as f:
f.write('小强:10本\n小青:15\n')
with open(r'C:\Users\Administrator\Desktop\t.txt','r',encoding='utf-8') as f:
#a=f.read()
#print(a)
for i in f:
if'小兰:12本'in i:
print("yes")
f.close()
\ No newline at end of file
for i in f:
if'小强:10本'in i:
i=i.replace('小强:10本','小强:11本')
#print(i)
new=new+i
#print(new)
with open(r'C:\Users\Administrator\Desktop\t.txt','w',encoding='utf-8') as f:
f.write(new)
\ No newline at end of file
a='我有一个苹果'
a.replace("一","三")
print(a)
\ No newline at end of file
importc tareie
pen=tuplelo-pen
peo penfor wond()
pen=tuple.pen()
for i in range(5):
pen.forward(200)
pen.right(144)
pen.hide
pen
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